Comprehensive data protection for all workloads
Post Reply
cgsm
Enthusiast
Posts: 93
Liked: 19 times
Joined: Oct 05, 2021 3:55 pm
Contact:

Validate all Restore Points

Post by cgsm »

Hello,
I have been tasked to validate each and every restore point we have in a repo. Every restore point, for every VM.

Basically, management wants to make sure all restore points usable (we store 1 monthly for 2 years, plus 8 weeks, and daily of course). We have Health Checks turned on, but that only checks the most recent restore point and not very old ones that could somehow have been affected by bitrot or other corruption).

I am trying to write a PowerShell script using the Veeam.Backup.Validator.exe tool to accomplish this. I can get the job, the VMs, and the restore points, but I cannot get the validator to function. Here is what I have. Can you offer some guidance? Is there a better way to do this?

Code: Select all

$jobs = Get-VBRJob
ForEach ($j in $jobs) {
    #Temporarily limit to one copy job.
    If ($j.name -ne "Copy To Immutable Job") {
        continue
    }

    $backupName = $j.Name
    $backupId = $j.Id
    
    Write-Output $backupName

    $points = Get-VBRRestorePoint -Backup $backupName
    
    ForEach ($p in $points) {     
        $pointId = $p.Id
        
        Write-Output $p.VmName
        Write-Output $p.PointId
        
        & "'C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Validator.exe /backup:$backupId /point:$pointId'"
    }
}
Mildur
Product Manager
Posts: 8735
Liked: 2296 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Validate all Restore Points

Post by Mildur »

Hello

Do you get an error message? I only see your script and not why "I cannot get the validator to function" :)
Please check the following kb article. I assume you affected by the new v12 backup format issue with the validator:
https://www.veeam.com/kb4485

Please also be aware, the health check and validator only validates backup file integrity. It doesn't guarantee you that the VM and applications can be powered on after a restore. To validate your backups fully, you should use our SureBackup jobs.

Best,
Fabian
Product Management Analyst @ Veeam Software
cgsm
Enthusiast
Posts: 93
Liked: 19 times
Joined: Oct 05, 2021 3:55 pm
Contact:

Re: Validate all Restore Points

Post by cgsm »

Mildur,
Yes, I understand validator only checks file consistency. This is okay for me. We do use SureBackup as well, but that only checks that the latest restore point can boot, so it doesn't help with very old restore points that may have been corrupted due to bitrot.

I have seen that KB article and have tried the suggestions (FindChildBackups) without success.

***

Below is my latest/current code. The error I am receiving is "Cannot find backup with ID "{...}" in backup "Copy To Immutable Job\Backup Job - VM_Name". This error seems very odd to me since I passed this backup job's name to Get-VBRRestorePoint get the restore point ID.

Code: Select all

$backup = Get-VBRBackup -Name "Copy To Immutable Job"
$backupId = $backup.Id

$children = $backup.FindChildBackups()
ForEach ($c in $children) {
    $childId = $c.Id
    $name = $c.name

    Write-Output "VM: $name $id"

    $points = Get-VBRRestorePoint -Backup $name
    ForEach ($p in $points) {
        $pointId = $p.Id
        
  
        Write-Output "Backup: $name"
        Write-Output "Point : $pointId"
        cmd.exe /c '"C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Validator.exe" /backup:'$childId' /point:'$pointId''
    }

}
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 130 guests