-
- Lurker
- Posts: 2
- Liked: never
- Joined: Apr 10, 2013 10:39 pm
- Full Name: Charles Naslund
- Contact:
Need way to cancel Veeam Backup Automatically
Hi;
I have an issue where we have two drives for daily backups of our servers. Both drives are external USB drives which are rotated daily to offsite storage. One external drive is used by Microsoft Shadow Copy for backups of our physical servers, the other drive is used by Veeam to backup our ESXi 5.x servers. We have a PA do our drive rotations daily, but sometimes she can get the two drives (both with large labels on them) in the wrong cradles. When this occurs, the Veeam backup job running that day can corrupt the shadow backup image on the incorrectly inserted drive.
Is there a way to write a pre-run script which will check to see if the correct daily backup drive is inserted and if the script fails, cancelling the daily VEEAM job from running? Any suggestions are requested.
Thank You,
Chuck
I have an issue where we have two drives for daily backups of our servers. Both drives are external USB drives which are rotated daily to offsite storage. One external drive is used by Microsoft Shadow Copy for backups of our physical servers, the other drive is used by Veeam to backup our ESXi 5.x servers. We have a PA do our drive rotations daily, but sometimes she can get the two drives (both with large labels on them) in the wrong cradles. When this occurs, the Veeam backup job running that day can corrupt the shadow backup image on the incorrectly inserted drive.
Is there a way to write a pre-run script which will check to see if the correct daily backup drive is inserted and if the script fails, cancelling the daily VEEAM job from running? Any suggestions are requested.
Thank You,
Chuck
-
- Veeam Software
- Posts: 21139
- Liked: 2141 times
- Joined: Jul 11, 2011 10:22 am
- Full Name: Alexander Fogelson
- Contact:
Re: Need way to cancel Veeam Backup Automatically
Chuck, you could probably have a scheduled task that kicks off a script checking whether the correct drive is inserted and then triggering the backup job using PowerShell.
-
- Expert
- Posts: 230
- Liked: 41 times
- Joined: Feb 18, 2011 5:01 pm
- Contact:
Re: Need way to cancel Veeam Backup Automatically
It might be easier to buy a physically different cradle for one of the backups, therefore making is physically impossible to insert the wrong drive into the wrong cradle.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Need way to cancel Veeam Backup Automatically
It depends on your situation solely.Is there a way to write a pre-run script which will check to see if the correct daily backup drive is inserted and if the script fails, cancelling the daily VEEAM job from running?
If your devices are mounted with the different names – like, device one is mounted as a “New Volume#1”, while another as “New Volume #2”, you can put into use something like this:
Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your Job"
$backupDrive = $null
$VolumeName = "Name of mounted volume" #For instance, New Volume#1
get-wmiobject win32_logicaldisk | % {
if ($_.VolumeName -eq $VolumeName) {
$backupDrive = $_.VolumeName
Write-Output "$VolumeName drive found!"
}
}
if ($backupDrive -eq $null) {
Write-Output "$VolumeName drive not found! "$Job.name" will be disabled"
$Job.DisableScheduler()
}
Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your Job"
$backupDrive = $null
$VolumeName = "Name of your drive" | #For instance, K:
get-wmiobject win32_logicaldisk | % {
if ($_.DeviceID -eq $VolumeName) {
$backupDrive = $_.DeviceID
Write-Output "$VolumeName drive found!"
}
}
if ($backupDrive -eq $null) {
Write-Output "$VolumeName drive not found! "$Job.name" will be disabled"
$Job.DisableScheduler()
}
As always don’t forget to test it, before implementing.
Hope this helps.
Thanks.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Apr 10, 2013 10:39 pm
- Full Name: Charles Naslund
- Contact:
Re: Need way to cancel Veeam Backup Automatically
Thank You for your replies!
Who is online
Users browsing this forum: Bing [Bot], fabian.papenfuss and 69 guests