We are trying to automate the creating of backup copy jobs, from our Windows Repositories to our immutable linux repos.
But we are facing an issue...
If we define immutable repo in the -Repository parameter for Add-VBRViBackupCopyJob, we get an error, that we have to enable GFS in order to do this.
Code: Select all
Add-VBRViBackupCopyJob -DirectOperation -Name $CopyJobName -BackupJob $SourceJob -EnableImmediateCopy -Repository $CopyRepo
Add-VBRViBackupCopyJob : Immutable backups feature requires the GFS retention policy enabled in the Backup Copy job settings.
Code: Select all
$SourceJob = Get-VBRJob -Name $NewTagName
$CopyRetainDays = $sourcejob.BackupStorageOptions.RetainDaysToKeep
$CopyJobName = "COPY_" + $NewTagName
Add-VBRViBackupCopyJob -DirectOperation -Name $CopyJobName -BackupJob $SourceJob -EnableImmediateCopy #-Repository $CopyRepo
$joboptions = New-VBRJobOptions -ForReplicaJob
$joboptions.BackupStorageOptions.RetainDaysToKeep = $CopyRetainDays
$joboptions.BackupStorageOptions.RetentionType = "Days"
$joboptions.BackupStorageOptions.RetainDays = 14
$JobOptions.BackupStorageOptions.EnableDeletedVmDataRetention = $True
$joboptions.GenerationPolicy.EnableDeletedVmDataRetention = $True
$joboptions.GenerationPolicy.DeletedVmsDataRetentionPeriodDays = 14
$JobOptions.RpoOptions.Enabled = $true
$joboptions.RpoOptions.Value = 24
$joboptions.RpoOptions.TimeUnit = "Hour"
$JobOptions.GfsPolicy.IsEnabled = $true
$joboptions.GfsPolicy.weekly.IsEnabled = $true
$joboptions.GfsPolicy.weekly.KeepBackupsForNumberOfWeeks = 1
$joboptions.GfsPolicy.weekly.DesiredTime = "Saturday"
$copyjobname | Set-VBRJobOptions -Options $joboptions
I then want to change the repository to our immutable linux repos, but it seems there is no cmdlet for that, besides having to copy the backup job to a new one?
powershell-f26/need-to-change-job-backu ... 72195.html
powershell-f26/change-backup-job-repository-t24267.html
What cmdlet / JobOptions property should i use, in order to change this properly?