Code: Select all
$Repository = "Repo1"
$Vm = Find-VBRHvEntity -Name "VM1"
$job = Add-VBRHvBackupJob -Name "Critical" -Description "Backup job for critical VMs" -BackupRepository $Repository -Entity $Vm
$jobOptions = Get-VBRJobOptions -Job $job
$jobOptions.BackupTargetOptions.Algorithm = "Increment"
Set-VBRJobOptions -Job $job -Options $jobOptions
1. Use on-host backup proxy and I can't find a setting for that.
2. We need to configure the retention policy, GFS, but are failing:
Code: Select all
# Create GFS options
$weeklyGFS = New-VBRGFSWeeklyOptions -RetentionPeriod 4 -SelectedDay Sunday
$monthlyGFS = New-VBRGFSMonthlyOptions -RetentionPeriod 12 -SelectedWeek First
$yearlyGFS = New-VBRGFSYearlyOptions -RetentionPeriod 2 -SelectedMonth January
# Combine GFS options into a policy
$gfsOptions = New-VBRGFSOptions -WeeklyOptions $weeklyGFS -MonthlyOptions $monthlyGFS -YearlyOptions $yearlyGFS
# Apply the GFS policy to the backup job
Set-VBRGFSRetentionPolicy -RetentionPolicy $gfsOptions -RestorePoints 30
Set-VBRGFSRetentionPolicy : Cannot bind parameter 'RetentionPolicy'. Cannot convert the "Veeam.Backup.PowerShell.Infos.VBRComputerGFSOptions" value of type Veeam.Backup.PowerShell.Infos.VBRComputerGFSOptions" to type "Veeam.Backup.PowerShell.Infos.VBRGFSRetentionPolicy".
Has anyone gotten this to work through PowerShell?