Availability for the Always-On Enterprise
AlexB
Influencer
Posts: 17
Liked: never
Joined: Aug 28, 2013 1:21 pm
Full Name: Alex Beck
Contact:

When are copy jobs triggered to run

Post by AlexB » Oct 31, 2013 1:09 pm

Hi

My situation:
I'm using backup copy jobs to transfer backups from local to remote site. For each VM there's a daily Job running Monday through Thursday plus Saturday and a weekly Job running on Friday. Daily backups are copied daily, weekly backups are copied once a week to remote site (copy intervals are set to one and seven days respectively). Source objects are taken from backup jobs.

My question:
I could not figure out when copy jobs are triggered to run. Say backup job ends at 22:00 and backup interval is set to start at 22:30. As a result I had expected to have a restore point copied at 22:30. But I got two backups created: one shortly after backup job finished and one at 22:30. This led me to the assumption that the backup job kick starts the copy job when finished. So I increased the copy interval to 3 days, finding that daily backups are no longer copied every day.

Can someone shed some light on this? Does it matter how the source VMs are chosen (from backups, from job, from infrastructure)? In addition, is it possible to
trigger a copy job as post job activity? This would be a possibility to circumvent the copy job beeing marked as failed when no new restore points are available.

Thanks in advance.

AlexB.

foggy
Veeam Software
Posts: 17116
Liked: 1399 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: When are copy jobs triggered to run

Post by foggy » Oct 31, 2013 1:49 pm

AlexB wrote:Say backup job ends at 22:00 and backup interval is set to start at 22:30. As a result I had expected to have a restore point copied at 22:30. But I got two backups created: one shortly after backup job finished and one at 22:30.
Alex, does this happen every day (does the job create two VIB files each day)?
AlexB wrote:Does it matter how the source VMs are chosen (from backups, from job, from infrastructure)?
No, the method of adding VMs in a job affects the scope of source restore points search only. Backup copy job is not affected by the regular backup job schedule.

AlexB
Influencer
Posts: 17
Liked: never
Joined: Aug 28, 2013 1:21 pm
Full Name: Alex Beck
Contact:

Re: When are copy jobs triggered to run

Post by AlexB » Oct 31, 2013 2:38 pm

foggy wrote:Alex, does this happen every day (does the job create two VIB files each day)?
Im not 100% sure, but I would say this happens every day. The second restore Point is always a .vib file of 16500kb in size and is not listed e.g. in Restore Wizard.
foggy wrote:No, the method of adding VMs in a job affects the scope of source restore points search only. Backup copy job is not affected by the regular backup job schedule.
Meanwhile I found this in the documentation: Linking Backup Jobs to Backup Copy Jobs: [...] As a result, the backup copy job starts monitoring the backup job linked to it. [...] As soon as a backup job session is finished and a new restore point is created, the backup copy job automatically copies this restore point to the target backup repository.

Apparently when linking jobs, the copy Job must be started somehow. But then what do I need the copy interval Setting for?

Vitaliy S.
Veeam Software
Posts: 21726
Liked: 1306 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: When are copy jobs triggered to run

Post by Vitaliy S. » Oct 31, 2013 2:39 pm

AlexB wrote:So I increased the copy interval to 3 days, finding that daily backups are no longer copied every day.
Yes, that's expected. With the setting like this, backup copy job will take the restore points for every 3 days.
AlexB wrote:In addition, is it possible to
trigger a copy job as post job activity? This would be a possibility to circumvent the copy job beeing marked as failed when no new restore points are available.
Backup copy job is running on the continuous schedule, so once it locates new restore points that match your synchronization interval ("Copy Every" setting), it will start copying VM backup. Not sure how would post backup job activity would help here.

lobo519
Expert
Posts: 297
Liked: 34 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: When are copy jobs triggered to run

Post by lobo519 » Oct 31, 2013 2:51 pm

I am also a bit confused. If the Copy job monitors the Backup job and Syncs when the job is completed, what is the point of setting the "Copy every" interval? How should this be set if I just want the Copy job to run when the backup job finishes?

AlexB
Influencer
Posts: 17
Liked: never
Joined: Aug 28, 2013 1:21 pm
Full Name: Alex Beck
Contact:

Re: When are copy jobs triggered to run

Post by AlexB » Oct 31, 2013 3:00 pm

Vitaliy S. wrote:Backup copy job is running on the continuous schedule, so once it locates new restore points that match your synchronization interval ("Copy Every" setting),
it will start copying VM backup. Not sure how would post backup job activity would help here.
If manual syncing could be forced with a post job activity, you would get Independent of the synchronization interval. Sync interval could be set to one week, but Manual sync is forced right after daily Job running from monday through thursday. Every backup would be copied and no failed jobs during days without new restore Points.

tsightler
Veeam Software
Posts: 5211
Liked: 2088 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: When are copy jobs triggered to run

Post by tsightler » Oct 31, 2013 3:36 pm

You can absolutely do this. There is a Powershell cmdlet that forces a manual sync:

Code: Select all

Sync-VBRBackupCopyJob -Job (Get-VBRJob -Name "<Name_of_job>")
You probably wouldn't want it to force a sync on Sundays, so you could add some logic to not force on those days. Or, if you don't want to add any logic, you could call that script via Windows Task Scheduler, and the schedule there allows for running only on specific days, so run the "force" script only on M-Th.

Vitaliy S.
Veeam Software
Posts: 21726
Liked: 1306 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: When are copy jobs triggered to run

Post by Vitaliy S. » Oct 31, 2013 3:42 pm

lobo519 wrote:If the Copy job monitors the Backup job and Syncs when the job is completed, what is the point of setting the "Copy every" interval?
"Copy every" interval is responsible for the restore points taken. In other words if you specify copy every 3 days, it will pick a restore point for VM that is not older than 3 days and the subsequent backup copy job run for this VM will be triggered in 3 days.
lobo519 wrote:How should this be set if I just want the Copy job to run when the backup job finishes?
Try using the PowerShell script that Tom has posted above or if you run your backup job on daily basis specifying 1 day as a "copy every" should do the trick as well.

v.Eremin
Veeam Software
Posts: 15412
Liked: 1164 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: When are copy jobs triggered to run

Post by v.Eremin » Oct 31, 2013 3:43 pm

You probably wouldn't want it to force a sync on Sundays, so you could add some logic to not force on those days.
Or you can run post job activity on specified days only (Run the following command -> On selected days only). Thanks.

tsightler
Veeam Software
Posts: 5211
Liked: 2088 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: When are copy jobs triggered to run

Post by tsightler » Oct 31, 2013 3:50 pm

v.Eremin wrote:Or you can run post job activity on specified days only (Run the following command -> On selected days only). Thanks.
Ha, good point! :oops:

Thinking about this some more, since there's no method to actually say what day you want the copy interval to expire you'll probably need to set the interval on the Backup Copy to something like 7 days, and then set the postjob script trigger on each day that you actually the Back Copy to actually run. The Backup Copy will never actually hit the interval since manual syncs reset the starting time for the interval, but that's OK. I've tested this only lightly in my lab, but it seems to work.

AlexB
Influencer
Posts: 17
Liked: never
Joined: Aug 28, 2013 1:21 pm
Full Name: Alex Beck
Contact:

Re: When are copy jobs triggered to run

Post by AlexB » Oct 31, 2013 4:04 pm

That's what I mentioned above. One Thing confuses me: when a Job is scheduled to run Mon-Thu, do I again need to Limit the post Job to run on specific days, too?

Vitaliy S.
Veeam Software
Posts: 21726
Liked: 1306 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: When are copy jobs triggered to run

Post by Vitaliy S. » Oct 31, 2013 4:24 pm

AlexB wrote:One Thing confuses me: when a Job is scheduled to run Mon-Thu, do I again need to Limit the post Job to run on specific days, too?
No you do not need to do that. but configuring the allowed data transfer window will not prevent backup copy job from failing because of the missing VM restore point on the weekend. It seems like the only option to suppress these error messages (if you run your main backup job only during business days) is to use this PS script.

tsightler
Veeam Software
Posts: 5211
Liked: 2088 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: When are copy jobs triggered to run

Post by tsightler » Oct 31, 2013 4:28 pm

If you're jobs are only running on Mon-Thu then the post-job will only run on Mon-Thur anyway. But up above you also mentioned a run on Sat, and then a full run on Friday that appears to be synced with a different copy job. If you set the copy interval in the job for 7 days, and then use the Powershell one-liner I posted earlier as a post-job to force the sync only when you want it, you should be able to get the behavior you want and no warnings about failed copies.

AlexB
Influencer
Posts: 17
Liked: never
Joined: Aug 28, 2013 1:21 pm
Full Name: Alex Beck
Contact:

Re: When are copy jobs triggered to run

Post by AlexB » Nov 01, 2013 9:10 am

Thanks guys for clearing this up. I will use the PS script like mentioned above.

One last question: when backup copy Jobs are run and no new restore points are available, an obviously empty .vib file is created in the target destination. Is this increment counted as restore point affecting the Retention policy (restore points to keep on disk)?

Vitaliy S.
Veeam Software
Posts: 21726
Liked: 1306 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: When are copy jobs triggered to run

Post by Vitaliy S. » Nov 01, 2013 9:15 am

No, it's not.

Post Reply

Who is online

Users browsing this forum: Exabot [Bot] and 21 guests