Comprehensive data protection for all workloads
Post Reply
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Backup copy job synchronization trigger issue

Post by ralftar »

I think I have a fairly good understanding of the scheduling of backup copy job (including the semantics of the "copy every" setting). However, after hours of searching, reading and testing the behavior of the feature leaves me a bit frustrated.
Having a backup copy job configured as the second target of a backup job that runs every 4th hour, is there an "out of the box" way to have the copy job launch immediately after the backup job is finished without specifying a smaller "copy every" interval?

This since (as far as I understand):
- Having a smaller copy every/synchronization interval than the backup job interval will lead to "empty" new restore points that is equal to the previous ones since a new backup source has not been produced within the time frame of the backup copy job.
- Having the same interval for both copy job and backup job, leads to that the copy job might be triggered hours after the actual backup has been produced.

So is there an out of the box way to configured the backup copy job (which is a secondary target for the backup job) to be triggered as soon as the backup job has finished? Or am I left with setting up a powershell hack?
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Backup copy job synchronization trigger issue

Post by PTide »

Hi,
is there an "out of the box" way to have the copy job launch immediately after the backup job is finished without specifying a smaller "copy every" interval?
Please check your backup and backup copy job start times. Everything should work Ok if you schedule your backup copy job to start, say, 5 minutes after backup job has started.
Having a smaller copy every/synchronization interval than the backup job interval will lead to "empty" new restore points that is equal to the previous ones since a new backup source has not been produced within the time frame of the backup copy job.
No, it does not create an empty restore point if there is nothing on the source side.
Having the same interval for both copy job and backup job, leads to that the copy job might be triggered hours after the actual backup has been taken
Copy job gets triggered when it finds a new RP on the source side.

Thank you.
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar »

Hi and thank you Pavel,
PTide wrote: Please check your backup and backup copy job start times. Everything should work Ok if you schedule your backup copy job to start, say, 5 minutes after backup job has started.
Hourly "copy every" intervals cannot be scheduled for a specific time. It is only for daily intervals.
PTide wrote: No, it does not create an empty restore point if there is nothing on the source side.
OK, I might have confused it the the empty RP when triggered it manually (?). However, successful reports are generated for each "empty" backup copy jobs.
PTide wrote: Copy job gets triggered when it finds a new RP on the source side.
Not if a backup copy job has already been issues of an older RP within the backup copy job interval.
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Backup copy job synchronization trigger issue

Post by PTide »

Hourly "copy every" intervals cannot be scheduled for a specific time. It is only for daily intervals.
Please give us more details about your backup plan. How often do you run your backup job?
However, successful reports are generated for each "empty" backup copy jobs.
That's how it supposed to work - the absence of RP on the source is not considered to be an error. Is that an issue for you?
Not if a backup copy job has already been issues of an older RP within the backup copy job interval.
Correct. If an RP has been already copied during the interval then next RP appearing during the same interval gets postponed until the next interval starts. If multiple RPs have been created on the source, then all of them get merged into one RP during next sync interval.

Thank you.
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar »

Hi Pavel, and thank you.
PTide wrote: Please give us more details about your backup plan. How often do you run your backup job?
The backup job runs every 4th hour, and the current setting of the backup copy job is every hour (since setting it to four hours will lead to delayed copy jobs).
PTide wrote: the absence of RP on the source is not considered to be an error. Is that an issue for you?
I agree that it is not an error, but nor a success.. "Success 0 of 0 VMs processed" (ie. backup has already been copied by precending jobs), sounds like a contradiction, as does "success" when nothing has been read, processed and transfered (ie. no new backup in source). The issue arises when using email notification for verifying that the copy job succeeded.
PTide wrote: No, it does not create an empty restore point if there is nothing on the source side.
I see that no additional RP is created for the empty backup copy jobs inside the console, but when manually browsing the repository there is crated and "empty" (?) .vib file (31 584 256 bytes), which is unfortunate.

Thank you once again.
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Backup copy job synchronization trigger issue

Post by PTide »

The backup job runs every 4th hour, and the current setting of the backup copy job is every hour (since setting it to four hours will lead to delayed copy jobs).
- Set backup copy job to every 4 hours and disable it
- Wait for backup job to start, wait 5 more minutes
- Enable backup copy job

That will make your backup copy job to start within 5 minutes after backup process thus taking new RP to remote site.
I agree that it is not an error, but nor a success.. "Success 0 of 0 VMs processed", sounds like a contradiction. The issue arises when using email notification for verifying that the copy job succeeded.
The approach mentioned in the beginning of this post should eliminate the issue.
I see that no additional RP is created for the empty backup copy jobs inside the console, but when manually browsing the repository there is crated and "empty" (?) .vib file (31 584 256 bytes), which is unfortunate.
That's right - copy job incrementals are created even if nothing to be put inside. That is being performed to keep the backup chain consistent. So that's a normal behaviour.
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar »

PTide wrote:- Set backup copy job to every 4 hours and disable it
- Wait for backup job to start, wait 5 more minutes
- Enable backup copy job

That will make your backup copy job to start within 5 minutes after backup process thus taking new RP to remote site.
Thanks once again Pavel! This could work, but it leaves two questions:

Will this it be persisted after a B&R server restart? Or do I have to “synchronize” it once again for each restart?

I belive each "copy every" iteration has a bit overhead (restart copy job, etc.). So I fear that the 5 minute offset will increase for each iteration, leaving a larger and larger offset. Is this a correct assumption?
PTide
Product Manager
Posts: 6431
Liked: 729 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Backup copy job synchronization trigger issue

Post by PTide »

Will this it be persisted after a B&R server restart? Or do I have to “synchronize” it once again for each restart?
Unfortunately, a synchronization will be needed.
I belive each "copy every" iteration has a bit overhead (restart copy job, etc.). So I fear that the 5 minute offset will increase for each iteration, leaving a larger and larger offset. Is this a correct assumption?
No there will be no offset - each new interval lasts exactly the specified amount of time.

With all said I think that an easier approach would be to leverage a post-job script that will trigger a synchronization after the backup has finished.

Thank you.
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar »

PTide wrote:No there will be no offset - each new interval lasts exactly the specified amount of time.
Yes, it lasts for the same time, but then it has to start and stop. For a one-hour interval I have registered these start times: Start time, 14:31:44, Start time 15:34:43, Start time 16:35:01. Implying an manually triggered offset would grow.
PTide wrote: With all said I think that an easier approach would be to leverage a post-job script that will trigger a synchronization after the backup has finished.
I agree. Enabling the backup copy job after the backup job is done, and disabling backup the copy job after the backup copy job should do the trick, when the "copy every" setting is set to a lower interval.

Thank you.
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar » 1 person likes this post

For the record, this is the two one-liners I ended up using for enabling and disabling the job as described:

Code: Select all

powershell -Command "& {Add-PSSnapin VeeamPSSnapin; Get-VBRjob -name 'My copy job name' | Enable-VBRJob}"
powershell -Command "& {Add-PSSnapin VeeamPSSnapin; Get-VBRjob -name 'My copy job name' | Disable-VBRJob}"
ralftar
Novice
Posts: 9
Liked: 2 times
Joined: Sep 21, 2015 10:24 am

Re: Backup copy job synchronization trigger issue

Post by ralftar » 1 person likes this post

Unfortunately, only every second RP was copied by the backup copy job when enabling and disabling the backup copy job after the backup job, thought the script above (the backup interval continued although it should have expired according to the set interval). Ended up with running Sync-VBRBackupCopyJob just after enabling the job, and everything worked much better.

Command after the backup job (enable and run backup copy job):

Code: Select all

powershell -Command "& {$n = 'My Backup Copy Job name'; Add-PSSnapin VeeamPSSnapin; Enable-VBRJob -job $n; Sync-VBRBackupCopyJob -Job $n;}"
Command after the backup copy job (disable itself):

Code: Select all

powershell -Command "& {$n = 'My Backup Copy Job name'; Add-PSSnapin VeeamPSSnapin; Disable-VBRJob -job $n;}"
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 133 guests