About two weeks ago i remembered a very underestimated feature from Veeam. The Veeam Backup Validator ! So I decided to create a Veeam Backup Validator PowerShell GUI out of it.
This command line tool helps you with checking your Veeam Backups. It checks your backup files via CRC at the file level. For the integrity validation of your backups the Validator uses the checksum algorithm.
After each creation of a backup file, Veeam calculates a checksum for every data block in the backup file and will attach the checksums to them. The Veeam Backup Validator re-calculates the checksums for data blocks and compares them with the initial written values.
You can find the Veeam Backup Validator.exe file by default under
%ProgramFiles%\Veeam\Backup and Replication\Backup\Veeam.Backup.Validator.exe
You can find out more on the Veeam Backup Validator on these sites:
https://helpcenter.veeam.com/docs/backup/vsphere/backup_validator.html?ver=95u4
Since i want to improve my skills on PowerShell i decided to write a PowerShell GUI for the Veeam.Backup.Validator.exe and would like to introduce it to the community !
I decided for the Veeam Backup Validator because i use it not that frequently, but when i have to, i always recheck the syntax even it is fairly easy.
The simple GUI looks like this:

In this first Version (Version 0.1) you are able to choose a .vbk or .vbm File for validation.

After choosing you can select whether you want to have a XML or a HTML Report.

The last step is to provide a directory for storing the generated Report through the Veeam Backup Validator .exe.

After you decided for a directory, the tool immediately starts to validate your backup files.
You can watch the process live, as the tools open up a Windows cmd where you can see the validation process.

After the process is finished, you can open up the report in your specified directory and check the validation process.

I really hope to get some feedback from the community as this is Version 0.1. I try to add some more features in the future, like validating a single virtual machine out of a backup job or file.
I would definetly appreciate any kind of feedback on this tool, as well as recommendations and improvements. Thank you !
Finally, here is the script:
You can also get it on github:
https://github.com/falkobanaszak/veeam-backup-validator-gui
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
<# .NAME Veeam Backup Validator PowerShell GUI .SYNOPSIS Use this free tool to validate your Veeam Backups with the built-in Veeam.Backup.Validator.exe .DESCRIPTION Released under the MIT license. .LINK https://github.com/falkobanaszak .VERSION 0.1 #> #region begin GLOBAL VARIABLES { $Global:SelectedFile =$Null $ValidatorPath = 'C:\Program Files\Veeam\Backup and Replication\Backup' $InitialDirectory = [Environment]::GetFolderPath('Desktop') #$ReportLocation="C:\Temp\" $ReportName="Veeam-Backup-Validation-Report_$(get-date -f dd-MM-yyyy-hh-mm-ss)" #endregion GLOBAL VARIABLES} #region begin FUNCTIONS { Function Choose-File($InitialDirectory) { Add-Type -AssemblyName System.Windows.Forms $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog $OpenFileDialog.Title = "Please Select File" $OpenFileDialog.InitialDirectory = $InitialDirectory $OpenFileDialog.filter = "Veeam Backup File (*.vbk)|*.vbk|Veeam Backup Metadata File (*.vbm)|*.vbm" If ($OpenFileDialog.ShowDialog() -eq "Cancel") { [System.Windows.Forms.MessageBox]::Show("No File Selected. Please select a file !", "Error", 0, [System.Windows.Forms.MessageBoxIcon]::Exclamation) } $Global:SelectedFile = $OpenFileDialog.FileName #$OpenFileDialog.ShowDialog() | Out-Null } Function Choose-Folder($InitialDirectory) { Add-Type -AssemblyName System.Windows.Forms $OpenFolderDialog = New-Object System.Windows.Forms.FolderBrowserDialog $OpenFolderDialog.ShowDialog() | Out-Null $Global:SelectedFolder = $OpenFolderDialog.SelectedPath } #endregion FUNCTIONS} Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.Application]::EnableVisualStyles() #Set-Location -Path 'C:\Program Files\Veeam\Backup and Replication\Backup' #region begin VBVGUI{ $VBVGUI = New-Object System.Windows.Forms.Form $VBVGUI.ClientSize = '300,275' $VBVGUI.text = "Veeam Backup Validator GUI" $VBVGUI.TopMost = $false $VBVGUIlblInfo = New-Object System.Windows.Forms.Label $VBVGUIlblInfo.Text = "Use this GUI to validate your Veeam Backups" $VBVGUIlblInfo.AutoSize = $true $VBVGUIlblInfo.Location = New-Object System.Drawing.Point(15,15) $VBVGUIlblInfo.Font = 'Microsoft Sans Serif,10' $VBVGUIValidateButton = New-Object System.Windows.Forms.Button $VBVGUIValidateButton.text = "Choose Folder and Start Validation" $VBVGUIValidateButton.width = 120 $VBVGUIValidateButton.height = 40 $VBVGUIValidateButton.location = New-Object System.Drawing.Point(90,155) $VBVGUIChooseFile = New-Object System.Windows.Forms.Button $VBVGUIChooseFile.text = "Choose .vbk or .vbm" $VBVGUIChooseFile.width = 120 $VBVGUIChooseFile.height = 30 $VBVGUIChooseFile.location = New-Object System.Drawing.Point(90,50) $VBVGUIXMLReport = New-Object System.Windows.Forms.RadioButton $VBVGUIXMLReport.text = "Create XML Report" $VBVGUIXMLReport.AutoSize = $true $VBVGUIXMLReport.width = 104 $VBVGUIXMLReport.height = 20 $VBVGUIXMLReport.location = New-Object System.Drawing.Point(10,100) $VBVGUIXMLReport.Font = 'Microsoft Sans Serif,10' $VBVGUIHTMLReport = New-Object System.Windows.Forms.RadioButton $VBVGUIHTMLReport.text = "Create HTML Report" $VBVGUIHTMLReport.AutoSize = $true $VBVGUIHTMLReport.width = 104 $VBVGUIHTMLReport.height = 20 $VBVGUIHTMLReport.location = New-Object System.Drawing.Point(160,100) $VBVGUIHTMLReport.Font = 'Microsoft Sans Serif,10' $VBVGUIHTMLReport.Checked = $true $VBVGUIDisclaimer = New-Object System.Windows.Forms.Label $VBVGUIDisclaimer.text = "Copyright (c) 2019 Falko Banaszak`n`nDistributed under MIT license." $VBVGUIDisclaimer.AutoSize = $true $VBVGUIDisclaimer.location = New-Object System.Drawing.Point(35,200) $VBVGUIDisclaimer.Font = 'Microsoft Sans Serif,10' #endregion VBVGUI} $VBVGUIChooseFile.Add_Click({ Choose-File #[System.Windows.Forms.MessageBox]::Show("The following file has been selected: $Global:SelectedFile" , "Information", 0, [System.Windows.Forms.MessageBoxIcon]::Information) }) $VBVGUIValidateButton.Add_Click({ If ($Global:SelectedFile -eq $Null) { [System.Windows.Forms.MessageBox]::Show("No File Selected. Please select a file !", "Error", 0, [System.Windows.Forms.MessageBoxIcon]::Exclamation) } else { IF ($VBVGUIXMLReport.Checked -eq "True") { Choose-Folder #$ReportString="$ReportLocation"+"$ReportName"+".xml" $ReportString="$Global:SelectedFolder"+"\"+"$ReportName"+".xml" Set-Location -path $ValidatorPath Start-Process cmd.exe -Wait "/c .\Veeam.Backup.Validator.exe /file:$Global:SelectedFile /report:$ReportString /format:xml" [System.Windows.Forms.MessageBox]::Show("Validation process finished !" , "Information", 0, [System.Windows.Forms.MessageBoxIcon]::Information) } Else { Choose-Folder #$ReportString="$ReportLocation"+"$ReportName"+".html" $ReportString="$Global:SelectedFolder"+"\"+"$ReportName"+".html" Set-Location -path $ValidatorPath Start-Process cmd.exe -Wait "/c .\Veeam.Backup.Validator.exe /file:$Global:SelectedFile /report:$ReportString" [System.Windows.Forms.MessageBox]::Show("Validation process finished !" , "Information", 0, [System.Windows.Forms.MessageBoxIcon]::Information) } } }) $VBVGUI.Controls.AddRange(@($VBVGUIlblInfo,$VBVGUIValidateButton,$VBVGUIXMLReport,$VBVGUIHTMLReport,$VBVGUIDisclaimer,$VBVGUIChooseFile)) [void] $VBVGUI.ShowDialog() |
virtualhome.blog My blog about virtualized infrastructures, backup and disaster recovery topics and the cloud !
2 comments
Pingback: Validando seus arquivos de backup - Explain IT
Pingback: Veeam Backup Validator - SecuredGuide