-
- Novice
- Posts: 4
- Liked: never
- Joined: Nov 14, 2016 12:45 pm
- Contact:
Backup Copy job post script
Hi,
I'm trying to configure a Backup Copy job to copy to an Azure VM.
The idea was that I would use the pre and post scripts to start/shutdown the Azure VM and take care of the VPN connection.
The problem is as this is a continuous job it doesn't really stop at all. So my pre script runs, then the copy/sync session but after that it sits there idle and does not execute the post scripts so my VM continues running.
I wonder if there is some reliable method to start the post script once the idle phase starts or if it's possible to run the whole Backup Copy job manually from a Powershell script at a given time and only at that time?
Regards,
Ales
I'm trying to configure a Backup Copy job to copy to an Azure VM.
The idea was that I would use the pre and post scripts to start/shutdown the Azure VM and take care of the VPN connection.
The problem is as this is a continuous job it doesn't really stop at all. So my pre script runs, then the copy/sync session but after that it sits there idle and does not execute the post scripts so my VM continues running.
I wonder if there is some reliable method to start the post script once the idle phase starts or if it's possible to run the whole Backup Copy job manually from a Powershell script at a given time and only at that time?
Regards,
Ales
-
- Veeam Software
- Posts: 21138
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Backup Copy job post script
How do you configure the post-job script? Do you use these settings?
-
- Novice
- Posts: 4
- Liked: never
- Joined: Nov 14, 2016 12:45 pm
- Contact:
Re: Backup Copy job post script
Yes, I use that configuration option to set both powershell scripts.
-
- Veeam Software
- Posts: 21138
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Backup Copy job post script
As far as I can recall, the script should trigger after data transfer tasks complete (i.e. exactly when the "idle" stage starts). Isn't that the case?
-
- Novice
- Posts: 4
- Liked: never
- Joined: Nov 14, 2016 12:45 pm
- Contact:
Re: Backup Copy job post script
I also assumed that's how it should work but it doesn't.
The job get's started, the pre script is run and then after finding out there are no up-to-date restore points it goes to idle without executing the post script.
The job get's started, the pre script is run and then after finding out there are no up-to-date restore points it goes to idle without executing the post script.
-
- Veeam Software
- Posts: 21138
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Backup Copy job post script
In this case it is expected that the script waits for the interval to expire as new restore points might appear at any time.Ales wrote:after finding out there are no up-to-date restore points
-
- Novice
- Posts: 4
- Liked: never
- Joined: Nov 14, 2016 12:45 pm
- Contact:
Re: Backup Copy job post script
So from what I tested tonight, this is how I think it works:
After the Copy Job is started it runs the pre script and than checks for:
After the new synchronization interval starts, the pre script is run again and the whole cycle repeats.
Do I understand it correctly or is there a flaw in my reasoning?
After the Copy Job is started it runs the pre script and than checks for:
- Is the current time in the synchronization interval?
- Is the current time in the Backup Copy window (Data transfer window) if it's not set to "any time"?
- Are there any valid and up-to-date restore points that match the formula "Time of restore point creation >= current time – synchronization interval"?
After the new synchronization interval starts, the pre script is run again and the whole cycle repeats.
Do I understand it correctly or is there a flaw in my reasoning?
-
- Veeam Software
- Posts: 21138
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Backup Copy job post script
Yes, the only flaw is that it will not copy the second restore point if it appears within the same sync interval (just a single restore point is copied within each interval), so it just waits for the end of the interval.
-
- Influencer
- Posts: 12
- Liked: 2 times
- Joined: Mar 31, 2018 5:40 pm
- Contact:
[MERGED] Backup Copy Job after-job-script problem
Hi,
for off-site retention we do additional nightly backup copy jobs to Tandberg RDX.
We want to automatically eject the RDX media after all backup copy jobs are done (we have two backup copy jobs because VM backups and Agent backups of PMs cannot be processed in one single job).
For this I created a small script that is triggerd by the copy jobs and locks ejection while one of the two jobs is still running, otherwise ejects media.
Unfortunately I have one problem: the before-job-script is always executed, but the after-job-script sometimes not, especially in following cases:
- backup copy job has been restarted during usual interval and latest restore points are already copied
- backup copy job is missing/waiting for new restore point, this often happens when Client with Veeam Agent Client has been shut down, which is very common when you backup Client PCs
So how to deal with that stupid behaviour? Any workaround?
Veeam B&R V9.5 U3
for off-site retention we do additional nightly backup copy jobs to Tandberg RDX.
We want to automatically eject the RDX media after all backup copy jobs are done (we have two backup copy jobs because VM backups and Agent backups of PMs cannot be processed in one single job).
For this I created a small script that is triggerd by the copy jobs and locks ejection while one of the two jobs is still running, otherwise ejects media.
Unfortunately I have one problem: the before-job-script is always executed, but the after-job-script sometimes not, especially in following cases:
- backup copy job has been restarted during usual interval and latest restore points are already copied
- backup copy job is missing/waiting for new restore point, this often happens when Client with Veeam Agent Client has been shut down, which is very common when you backup Client PCs
So how to deal with that stupid behaviour? Any workaround?
Veeam B&R V9.5 U3
-
- Veeam Software
- Posts: 21138
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
[MERGED] Re: Backup Copy Job after-job-script problem
The script runs after all data processing tasks complete or, in case there are any pending tasks, waits for the interval expiration, which looks consistent with what you're seeing.
Who is online
Users browsing this forum: Bing [Bot], NG-LF, Semrush [Bot] and 167 guests