-
- Enthusiast
- Posts: 63
- Liked: 3 times
- Joined: Aug 14, 2012 11:34 am
- Contact:
Set options for Backup Copy job
Hello all
I try to change some settings of a Backup Copy job, with the Options:
- enable the Backup Copy job
- set Restore points to 30 days
- set VM retention to 40 days
But it doesnt seems to work like with a normal Backup job.
Regards
oli4
I try to change some settings of a Backup Copy job, with the Options:
- enable the Backup Copy job
- set Restore points to 30 days
- set VM retention to 40 days
But it doesnt seems to work like with a normal Backup job.
Regards
oli4
-
- Product Manager
- Posts: 6408
- Liked: 724 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Set options for Backup Copy job
Hi,
Thank you.
Please describe what result did you expect and how it differs from what you got.But it doesnt seems to work like with a normal Backup job.
Thank you.
-
- Enthusiast
- Posts: 63
- Liked: 3 times
- Joined: Aug 14, 2012 11:34 am
- Contact:
Re: Set options for Backup Copy job
Hello
I try with this:
But it didn't change anything. As far as I understood for backup copy jobs you also have to use Get-VBRJob options.
I try with this:
Code: Select all
$Job = Get-VBRJob -Name <Name of Backup Copy job>
$Options = $Job.GetOptions()
$Options.BackupStorageOptions.RetainCycles = 40
$Options.BackupStorageOptions.EnableDeletedVmDataRetention = $True
$Options.JobOptions.RunManually = $false
$Job.SetOptions($Options)
-
- Product Manager
- Posts: 20270
- Liked: 2252 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Set options for Backup Copy job
I think the following example should to the trick:
Be aware that most of the backup copy job specific settings can be found under .Options.GenerationPolicy subnode.
Thanks.
Code: Select all
$Job = Get-VBRJob -Name "Backup Copy Job 1"
#Enable a backup copy job
Enable-VBRJob -Job $Job
#Disable a backup copy job
Disable-VBRJob -Job $Job
$Options = $Job.GetOptions()
#Set simple retention to 30
$Options.GenerationPolicy.SimpleRetentionRestorePoints = "30"
#Enable deleted VM retention
$Options.GenerationPolicy.EnableDeletedVmDataRetention = $True
#Set deleted VM retention to 40
$Options.GenerationPolicy.DeletedVmsDataRetentionPeriodDays = "40"
#Apply new settings
$Job.SetOptions($Options)
Thanks.
-
- Enthusiast
- Posts: 63
- Liked: 3 times
- Joined: Aug 14, 2012 11:34 am
- Contact:
Re: Set options for Backup Copy job
Thanks, with this it worked.
-
- Product Manager
- Posts: 20270
- Liked: 2252 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Set options for Backup Copy job
You're welcome. Let me know, if you come across any issue with scripting. Thanks.
Who is online
Users browsing this forum: No registered users and 17 guests