Veeam Hidden Feature – Backup Validator

So the other day I was using the Veeam Backup Extractor Tool, located in the installation folder, when I noticed another .exe file that I hadn’t paid attention to previously.

  • Veeam.Backup.Validator.exe

This a CLI based tool, and does exactly as the name suggests, validates backups.

You can access it by running command prompt;

  •  CD “C:\Program Files\Veeam\Backup and Replication\Backup”
  • Veeam.Backup.Validator.exe and your arguments(to see the full options, see at the bottom)

This is a handy little tool for validating the backup files, and can probably be scripted as well. However unlike the SureBackup feature, it will not guarantee that once the files have been restored, the Virtual Machine’s operating system is intact and in a working condition.

An example of its use

You can use this tool to validate the backups and it will display it in the console window, or to output to either a XML or HTML file, as I’ve done myself in this example.

You can see the restore point of which the backup is validating and the time created, the location of the report to file, and the individual VM files been checked.

2015-01-14_13-44-12

At the end you get a final summary of the backup file that has been validated.

2015-01-14_13-44-32

The HTML file that is generated is in the usual Veeam Format,

2015-01-14_13-45-23

Powershell Script

Below is a Powershell Script created by myself and Nathan Byrne.

This script pulls all your Backup Job names, and then runs the validator against each of these with the output going to a HTML file, which is then emailed to a destination of your choice.

#Set the Output file location
$VeeamOutputFile = "c:\Powershell\VeeamValidation-$jobname-$date.html"

#Set the sending email address and destination address
$SenderAddr = "Veeam@Company.co.uk"
$DestinationAddr = "User@Company.co.uk"

#Set the email server
$SMTPServer = "mail.company.co.uk"

######################################
#Do not edit anything below this line#
######################################

Add-PSSnapIn VeeamPSSNapin
$date = (Get-Date).AddDays(-1).ToString('dd-MM-yyyy')
set-location "C:\Program Files\Veeam\Backup and Replication\Backup"
$jobs = get-vbrjob
foreach ($job in $jobs)
{
$jobname = $job.name

#This is to display the Job Names in the console for troubleshooting
write-output $jobname

#Runs the exe file with the necessary parameters 
.\veeam.backup.validator.exe /backup:"$jobname" /format:html /report:"$VeeamOutputFile"

#Set the location of the output file
$JobFile = $VeeamOutputFile

#Sends the output files to a recipient
send-mailmessage -from "<$SenderAddr>" -to "<$DestinationAddr>" -subject "Veeam Validation Report for $jobname" -body "Report Attached." -Attachments "$JobFile" -priority High -dno onSuccess, onFailure -smtpServer $SMTPServer
}
The options available
C:\Program Files\Veeam\Backup and Replication\Backup>Veeam.Backup.Validator.exe
?
Veeam Backup Validator Version 8.0.0.0
Copyright (C) Veeam Software AG. All rights reserved.

Validates a content of backup files.

Veeam.Backup.Validator.exe /backup:backupname|backupid [/vmname:vmname]
 [/point:pointid] [/date:pointdate] [/time:pointtime] [/silence]
 [/skip] [/report:reportpath [/format:xml|html]]

Veeam.Backup.Validator.exe /file:backupfile{1..*} [/vmname:vmname] [/silence] [/
skip]
 [/report:reportpath [/format:xml|html]]

Parameters:
 /? - Displays help
 /backup - Specifies backup name or backup ID
 /vmname - Specifies one or more VM names (empty value for all VMs)
 /point - Specifies restore point ID
 /date - Specifies restore point date
 /time - Specifies restore point time
 /silence - Enables silence output mode
 /skip - Skips specified VMs
 /report - Generates HTML report at the specified path
 /file - Specifies one or more backup files (VBM, VBK, VIB, VLB)
 /format - Specified report format (HTML, XML)

Examples:
 > Veeam.Backup.Validator.exe /backup:"Backup Job 1_imported" /vmname:W2008
 > /vmname:W2008R2_DC /vmname:W2K

 Validates the virtual machines with names "W2008", "W2008R2_DC" and "W2K"
 in the last backup with name "Backup Job 1_imported".

 > Veeam.Backup.Validator.exe /backup:3942788C-B309-4FA4-A111-A4C87B3EC63D

 Validates all virtual machines in the last backup with ID
 3942788C-B309-4FA4-A111-A4C87B3EC63D.

 > Veeam.Backup.Validator.exe /backup:"Backup Job 1" /vmname:"Windows 8"
 > /date:05.12.2012

 Validates a virtual machine with name "Windows 8" in the last backup
 "Backup Job 1" that has been created on specified day.

 > Veeam.Backup.Validator.exe /backup:"Backup Job 2" /vmname:"VM1"
 > /date:"05.12.2012" /time "16:00"

 Validates a virtual machine with name "VM1" in the last backup of
 "Backup Job 2" that has been created around 16:00 on specified day.

 > Veeam.Backup.Validator.exe /file:"C:\Backup\VM2_Backup.vbm" /vmname:"VM2"

 Validates a virtual machine with name "VM2" in VBM-file (backup meta file).

 > Veeam.Backup.Validator.exe /file:"C:\Backup\VM2_Backup.vbk"

 Validates all virtual machines in VBK-file (backup file).

 > Veeam.Backup.Validator.exe /backup:"Backup Job 1" /vmname:"VM3"
 > /report:"D:\Reports\Backup_Job_1_Validate_30_09_2014.html"

 Validates a virtual machine with name "VM3" in the last backup of
 "Backup Job 1" and creates HTML-report.

 > Veeam.Backup.Validator.exe /backup:"Backup Job 1" /vmname:"VM3"
 > /report:"D:\Reports\Backup_Job_1_Validate_30_09_2014.xml" /format:xml

 Validates a virtual machine with name "VM3" in the last backup of
 "Backup Job 1" and creates XML-report.


C:\Program Files\Veeam\Backup and Replication\Backup>

 

Regards

Dean

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.