Launch Backup Copy Job exclusively through PowerShell

PowerShell script exchange

Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby Jamesdld23 » Wed Nov 30, 2016 9:24 am

Hello,

I am currently launching a Backup Copy Job (BCJ) through a script that is launched after the execution of a Backup Job.
I use the the command "Sync-VBRBackupCopyJob -Job $Job" to do that.

My problem is that the job can also be ran automatically when the BCJ's copy interval is reached, it would have been perfect for me if the Sync-VBRBackupCopyJob command could perform a reset the time beginning of the copy interval.

To give more context, I need to use a script because of the following reason :

My BCJ's target repository is a StorSimple applicance, when all data is received I launch a job that exteranizes the data to the cloud (a cloud snapshot)
The BCJ should only be run when no cloud snapshot are running


Thanks for helping
James
Jamesdld23
Enthusiast
 
Posts: 25
Liked: 6 times
Joined: Fri Aug 19, 2016 12:59 pm
Full Name: James Dumont

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby Jamesdld23 » Thu Dec 01, 2016 8:43 am

Not sure about it but does this command could do the job?
Disable-VBRJobSchedule -Job $job
Jamesdld23
Enthusiast
 
Posts: 25
Liked: 6 times
Joined: Fri Aug 19, 2016 12:59 pm
Full Name: James Dumont

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby v.Eremin » Thu Dec 01, 2016 9:29 pm

Hmm, the mentioned cmdlet issues Sync Now command to a backup copy job. In case of copy interval being equal to one or more days this command should start a new cycle on the following day.

Doesn't it happen in your case or you're after something else?

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby Jamesdld23 » Fri Dec 02, 2016 9:25 am

The job is configured to launch a "copy every" 7 days, my script launches it about every 3 days (with the Sync-VBRBackupCopyJob cmdlet) and I observed that it launches itself after 7 days ...
This last automatic launch occur at this date : 06:25 29/11/2016, I will see in 7 days what will happen.
Jamesdld23
Enthusiast
 
Posts: 25
Liked: 6 times
Joined: Fri Aug 19, 2016 12:59 pm
Full Name: James Dumont

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby v.Eremin » Fri Dec 02, 2016 10:26 am

Hmm, looks strange, because in your case interval should get reset every three days and weekly interval (started the next day) should never finish. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby Jamesdld23 » Thu Dec 22, 2016 1:28 pm

I think that what did reset the cycle was a reboot of the Veeam Backup & Replication server.
Is it possible?
Jamesdld23
Enthusiast
 
Posts: 25
Liked: 6 times
Joined: Fri Aug 19, 2016 12:59 pm
Full Name: James Dumont

Re: Launch Backup Copy Job exclusively through PowerShell

Veeam Logoby v.Eremin » Thu Dec 22, 2016 3:16 pm

Nope, unless you've included other commands in your script. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests