-
- Novice
- Posts: 7
- Liked: never
- Joined: Mar 14, 2012 9:34 pm
- Full Name: Jason McElvoy
- Contact:
Modify the repeat time of replicas
In working with Veeam support, I need to back off how frequently I have my replica jobs running. Right now they run ever 1-2 hours. I'd like to start with every 4 hours to see if it improves performance. I can see in ScheduleOptions there are options for RepeatNumber and RepeatTimeUnit. I think I simply need to modify the RepeatNumber for all my jobs. The tech I was on the phone with couldn't quickly figure it out so I figured I'd ask here. How can I modify all replica jobs to repeat ever 4 hours?
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Modify the repeat time of replicas
Hi, Jason.
In the way I see it, the following script should answer your requirements:
Or you're willing to modify the settings of every replication job you have in your environment?
Thanks.
In the way I see it, the following script should answer your requirements:
Code: Select all
asnp VeeamPSSnapin
$Job = Get-VBrJob -name "Name of replication Job"
$ScheduleOptions = $Job.GetScheduleOptions()
$ScheduleOptions.OptionsPeriodically.FullPeriod = "240"
Set-VBRJobScheduleOptions -Job $Job -Options $ScheduleOptions
Thanks.
-
- Novice
- Posts: 7
- Liked: never
- Joined: Mar 14, 2012 9:34 pm
- Full Name: Jason McElvoy
- Contact:
Re: Modify the repeat time of replicas
Thanks, that does work.
If I wanted to do every replication job at the same time, how would I achieve that? I took out the -name part of the script and placed a * in there and for some reason it changed 1 random job. Can you not use wildcards?
If I wanted to do every replication job at the same time, how would I achieve that? I took out the -name part of the script and placed a * in there and for some reason it changed 1 random job. Can you not use wildcards?
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Modify the repeat time of replicas
If you try to do that then $Jobs will hold and array of job objects so whichever one was first in the list will be the one changed. To change all of them you'd need to add a loop to cycle through every job in the array, something like this (untested, but I think it's right):
Code: Select all
asnp VeeamPSSnapin
$Jobs = Get-VBRJob -Name "*"
for ($Job in $Jobs) {
$ScheduleOptions = $Job.GetScheduleOptions()
$ScheduleOptions.OptionsPeriodically.FullPeriod = "240"
Set-VBRJobScheduleOptions -Job $Job -Options $ScheduleOptions
}
-
- Novice
- Posts: 7
- Liked: never
- Joined: Mar 14, 2012 9:34 pm
- Full Name: Jason McElvoy
- Contact:
Re: Modify the repeat time of replicas
Thanks. Just what I needed.
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Modify the repeat time of replicas
I believe, the missing part is that script provided above doesn’t have any distinguishing mechanism between replication and backup jobs. In other words, it does change settings of both backup and replication jobs. So, if you’re willing to apply changes only to replication ones, you should change the script slightly:
Hope this helps.
Thanks.
Code: Select all
asnp VeeamPSSnapin
Foreach ($Job in (Get-VBRJob | where {$_.Jobtype -eq "Replica"}))
{
$ScheduleOptions = $Job.GetScheduleOptions()
$ScheduleOptions.OptionsPeriodically.FullPeriod = "240"
Set-VBRJobScheduleOptions -Job $Job -Options $ScheduleOptions
}
Thanks.
Who is online
Users browsing this forum: No registered users and 16 guests