Comprehensive data protection for all workloads
Post Reply
Hasslehogg
Enthusiast
Posts: 40
Liked: never
Joined: May 28, 2010 2:10 pm
Full Name: Michael Hogg
Contact:

Post Job Activity

Post by Hasslehogg »

Hi

I am running a script as a post job activity but was wondering if there was a way to only run when the job was 100% successful please? At present say i have 10 vms in 1 job and 2 fail, the script still runs even though only 8 of the vm's have backed up, i want it to wait until all 10 are backed up, is there any way of doing this?

Also a question please. in the above scenario, does the script run again after Retry 1 for the remaining 2 vms?

thanks as always guys
Vitaliy S.
VP, Product Management
Posts: 27114
Liked: 2720 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Post Job Activity

Post by Vitaliy S. »

Hi Michael,

You should be using this PowerShell script to check job status and then execute your post-backup job action > Veeam Backup v4 wait command
Also a question please. in the above scenario, does the script run again after Retry 1 for the remaining 2 vms?
As far as I remember it will be executed every time.

Thanks!
Hasslehogg
Enthusiast
Posts: 40
Liked: never
Joined: May 28, 2010 2:10 pm
Full Name: Michael Hogg
Contact:

Re: Post Job Activity

Post by Hasslehogg »

thanks again Vitaliy
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Post Job Activity

Post by veremin »

It’s certainly possible to use PS in order to check the latest job result. Though, the the previously used .GetStatus() commandlet isn’t present any longer. It's GetLastResult() that should be used, instead. Thanks.
Hasslehogg
Enthusiast
Posts: 40
Liked: never
Joined: May 28, 2010 2:10 pm
Full Name: Michael Hogg
Contact:

Re: Post Job Activity

Post by Hasslehogg »

Hi guys

i have another question related to this. If i use the powershell command in the post job script to check if the backup was a success before putting to tape, will the backup to tape/script only run once all 100% of the vm's were successful, or would it run multiple times if for example i have 1 job with 20 vm's and 10 fail to backup, would the tape script run once and backup the 10 successful vm's to tape then once the veeam job retried and backup up the remaiing 10 successfully, the tape script would run again?

i am just trying to understand how the powersheel success job command and the post script works, multiple times on success or run once when they get 100% of all vm's backed up?

thanks
Vitaliy S.
VP, Product Management
Posts: 27114
Liked: 2720 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Post Job Activity

Post by Vitaliy S. »

Michael,

PowerShell cmdlet will return you the status of the entire job, so if it reports a "success" status, then it means that all VMs have been successfully backed up. In this case your post-backup job script will run only once.

Thanks!
Hasslehogg
Enthusiast
Posts: 40
Liked: never
Joined: May 28, 2010 2:10 pm
Full Name: Michael Hogg
Contact:

Re: Post Job Activity

Post by Hasslehogg »

Great stuff, thanks again Vitaliy
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Post Job Activity

Post by veremin »

I believe the script will be run each retry, though, if written correctly, it won’t proceed to copying to tape steps, unless the latest job result was “Success”. And the job can only have such a result when every VMs within it have been backed up successfully.

Thanks.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 96 guests