Host-based backup of VMware vSphere VMs.
Post Reply
Ahmed Shakran
Novice
Posts: 9
Liked: 3 times
Joined: Feb 23, 2023 2:01 pm
Full Name: Ahmed Shakran
Contact:

Health Check for Backup Files takes long time, use Veeam Backup Validator script

Post by Ahmed Shakran »

Health Check for Backup Files takes long time, use Veeam Backup Validator script.
Health check runs as last step in backup job session and backup job stays in running status until health check finishes, so if health check takes long time +24 hours that will impact on daily backup job and the next job won’t run, that causes management problem because you won’t have backup images for some days.

Unlike health check, backup validator runs individually and not part of backup job steps so it won’t impact daily schedule of backup job, moreover you can automate backup validator using below PowerShell script.
This script will create a report for the result and details of backup validator for specific job then send it by email.

{{{
$Date = Get-Date -Format "dd-MM-yyyy_HH-mm-ss"
$Cluster = 'VMware Cluster name'
$Policy = "Name of backup job"
$Path = "The path for validation report"
$Output = New-Item -Path $Path\$Policy" "$date.html
cd 'C:\Program Files\Veeam\Backup and Replication\Backup\'
.\Veeam.Backup.Validator.exe /backup:$Policy /report:$Output

# SMTP Configuration
$email_infoTO = "Receiver Email address"
$email_infoFrom = "Sender Email address"
$email_infoServer = "smtp server"
$SmtpPort = "25"
# Message Configuration (For loop to check if the result of the validation is written in the report or not before sending the email)
$i= 1
for( ;$i -le 2){
$html = [string]$(Get-Content $Output)
if($html -ne $null){
$i = 3
}
Start-Sleep -s 1800
}
$Jobname = $Policy
$Message = New-Object System.Net.Mail.MailMessage $email_infoFrom,$email_infoTO
$Message.IsBodyHTML = $true
$Message.Subject = "$Jobname Backup Validation"
$Message.Body = $html

#Sending email
$Smtp = New-Object Net.Mail.SmtpClient($email_infoServer,$SmtpPort)
$Smtp.EnableSsl = $false
$Smtp.Send($Message)
}}}


You can run the script using Task scheduler at backup server by adding the PowerShell script in Actions as shown below:
Image


Or run it after the backup job by adding it in the backup job advanced setting under storage as shown below:
Image
Best Regards,
Ahmed Shakran
Mildur
Product Manager
Posts: 8735
Liked: 2296 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Health Check for Backup Files takes long time, use Veeam Backup Validator script

Post by Mildur »

Hello Ahmed

Thanks for the script.
I strongly suggest to analyze slow behavior first with our customer support team before building workarounds which probably may not be necessary.

Best,
Fabian
Product Management Analyst @ Veeam Software
Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests