In a Veeam Backup & Replication environment with a high number of jobs, being sure the configured settings are all the same can be a tough task. Even if there are defined procedures to create new jobs, and every IT admin has these procedures, an error can always happen.
Look at this example. You are using a series of network storage repositories, so you decided the best setting for deduplication ratio is “LAN target”, that is 512KB block size. When different jobs are created at different times, by different admins, it can happen this parameter is configured wrong (also, because is not the default one). If you have few jobs to check, you can think about opening all of them one by one anche verify this parameter, but as the number of jobs grows, these checks becomes nearly impossible.
Even if the best solution would be an IT automation tool like Puppet, that would be able to check and adjust discrepancies, a nice solution is to leverage the complete Powershell support offered by Veeam Backup & Replication.
First, you need to load Veeam snap-in in powershell:
#Initialize Veeam PS Snapin asnp VeeamPSSnapin -ErrorAction Continue
Then, use one of your job as input (it does not matter which one) for the script, and retrieve the available options:
#Get the list of available Job Options Get-VBRJobOptions -Job "Job Name"
From here, you can retrieve the sub-options of a primary option:
#Get the list of sub-options of a given Option $job = Get-VBRJob -Name "Job Name" $option = $job.GetOptions() $option.SanIntegrationOptions
In this example I checked if the job is using Storage Snapshots. You can use the same method to retrieve several information. For example, you can find out retention policies, compression or deduplication, like this:
#Get the list of sub-options of a given Option $job = Get-VBRJob -Name "Job Name" $option = $job.GetOptions() $option.BackupStorageOptions
Once you know how to call a given parameter, you can build a table that can show you all these parameters at once, for all your jobs:
#Get Desired Job options from all your Backup Jobs Get-VBRJob | ? {$_.jobtype -eq "Backup"} | Select-Object -Property @{N="Job Name"; E={$_.name}}, @{N = "Compression Level" ; E = {$_.GetOptions().BackupStorageOptions.CompressionLevel}}, @{N = "Dedup Block Size" ; E = {$_.GetOptions().BackupStorageOptions.StgBlockSize}}, @{N = "SAN Integration" ; E = {$_.GetOptions().SanIntegrationOptions.UseSanSnapshots}} | Format-Table -AutoSize
In this way, it’s easy to find out like in my example that some jobs has a wrong compression level (5 is Optimal in the GUI, while 6 is High), or a wrong Dedup Block Size, or which job is using Storage Snapshots. With these informations at hand, it’s much easier to level all your jobs.