PowerShell script exchange
Post Reply
CharadeUR
Influencer
Posts: 21
Liked: never
Joined: Mar 05, 2012 2:29 pm
Full Name: George Streeter
Contact:

script to check if repository is on line before running

Post by CharadeUR »

I want to create two jobs to run every Saturday but each job would only run if their respective repository is online. I would need the job to check for the repository then not run the backup if the repository was not found. Thanks.

Sethbartlett
Expert
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: script to check if repository is on line before running

Post by Sethbartlett » 1 person likes this post

You would not be able to use our job scheduler. You would need to use windows task scheduler or something outside of Veeam to do this, but the script would not be too hard to write.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.

CharadeUR
Influencer
Posts: 21
Liked: never
Joined: Mar 05, 2012 2:29 pm
Full Name: George Streeter
Contact:

Re: script to check if repository is on line before running

Post by CharadeUR »

Thanks for that. I did write a little batch file that looks like it will work.

Code: Select all

ping 192.168.2.235
if errorlevel 1 goto END
"C:\Program Files\Veeam\Backup and Replication\Veeam.Backup.Manager.exe" backup 6de05213-6194-429b-a9eb-ae05ecbc491e
:END
My only question at this point is if I don't use the Veeam scheduler does it still retry failed VMs 3 times?

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

Re: script to check if repository is on line before running

Post by foggy »

CharadeUR wrote:My only question at this point is if I don't use the Veeam scheduler does it still retry failed VMs 3 times?
Yes, I believe you can even alter the number of retries using PowerShell.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests