If I change the retention on the current job, it will remove all restore points previous to the new setting, and we can’t lose a years worth of backups.
If I disable the current job and make a new one, the old job will never run again, therefore data won’t be aged out (unlike another backup product I use, Data Aging is not a separate process that runs independent of jobs).
So this is a problem. I need the old data to age off normally AND have a Copy job doing GFS.
Having spoken with Veeam Support, their suggestion was keep the existing job, make the copy job for GFS, then create a Powershell script that runs post-thaw to reduce the jobs retention settings by n-1.
So here's what I have so far - this will set retention to a static value by replacing #current value minus 1# with an integer like 7 or 14. What I can't figure out is how to set the variable to itself-1. Any assistance?
Code: Select all
Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
$Job = Get-VBRJob -Name 'job name'
$JobOptions = Get-VBRJobOptions $job
$JobOptions.BackupStorageOptions.RetainCycles = #current value minus 1#
Set-VBRJobOptions -job $Job -Options $JobOptions