-
- Novice
- Posts: 4
- Liked: never
- Joined: Dec 18, 2015 9:43 am
- Full Name: Helge Hoese
- Contact:
Stop tape jobs - Automatic Cancellation feature?
Hi,
after problems with tapes having same media_id* and single tape LTO drives veeam shows many mounted medias (after using the hardware edject button) we are using the option "Eject media once the job finishes". Most of our small business cutomers only change tapes and get job mails - no access to management interface.
But sometimes people forget changing the tape. After inserting a new Tape job starts - and the next job execution fails at night -waiting for tape
OK we can stop the jop at the management interface and get a message :
"VM's files for this job will be left in the inkosistent state. One or more VMs have incomplete, unusable restore points. Stop the Job anyway?"
Sounds not really good to me - ok it stops the job. What exactly is the meening of inconsisting state, incomplete, unusable restore points? When job starts again it creates new restore points - or we are wrong.
We are missing a shedule option : A backup job not completed within a specific amount of time can be automatically canceled by a defined maximum time value.
Any hints - thanks!
Helge
* many thanks for great support tweaking the database
after problems with tapes having same media_id* and single tape LTO drives veeam shows many mounted medias (after using the hardware edject button) we are using the option "Eject media once the job finishes". Most of our small business cutomers only change tapes and get job mails - no access to management interface.
But sometimes people forget changing the tape. After inserting a new Tape job starts - and the next job execution fails at night -waiting for tape
OK we can stop the jop at the management interface and get a message :
"VM's files for this job will be left in the inkosistent state. One or more VMs have incomplete, unusable restore points. Stop the Job anyway?"
Sounds not really good to me - ok it stops the job. What exactly is the meening of inconsisting state, incomplete, unusable restore points? When job starts again it creates new restore points - or we are wrong.
We are missing a shedule option : A backup job not completed within a specific amount of time can be automatically canceled by a defined maximum time value.
Any hints - thanks!
Helge
* many thanks for great support tweaking the database
-
- Product Manager
- Posts: 20414
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Prior to answering your question it's worth understanding what situation led to the described behaviour ("job fails with waiting for a new tape" message). Am I right in assuming that it's been just caused by previously written media ejected after job's end that responsible individual forgot to replace with a new medium? Thanks.
-
- Product Manager
- Posts: 14726
- Liked: 1706 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
If you are talking about backup to tape job there is a schedule option to run the tape job automatically ‘as new backup as a new file appear…’ where you can specify the desired backup windows.
This warning is displayed while the tape job is running and you are canceling it to let you know that files written to tape during this job run will be inconsistent (because you are going to stop the writing process somewhere in the middle). Nothing to worry about if the you are canceling the job in waiting for tape state.VM's files for this job will be left in the inkosistent state
-
- Novice
- Posts: 4
- Liked: never
- Joined: Dec 18, 2015 9:43 am
- Full Name: Helge Hoese
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
@Dima - thanks for the clarification. OK its what we already guessed but the warning sound s a litle bit dangerous.
@v. Eremin
Yes, you are right - previously written media ejected after job's end and responsible individual forgot to replace with a new medium.
@v. Eremin
Yes, you are right - previously written media ejected after job's end and responsible individual forgot to replace with a new medium.
-
- Product Manager
- Posts: 20414
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
In this case, you could ignore the said message, as nothing additional has been written to tape medium. Thanks.
-
- Novice
- Posts: 4
- Liked: never
- Joined: Dec 18, 2015 9:43 am
- Full Name: Helge Hoese
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Ok, we can manual cancel the tape job - but we are missing a shedule option :
A (tape) backup job not completed within a specific amount of time can be automatically canceled by a defined maximum time value.
-> No manual intervention after christmas or anyone forgot to replace the medium.
A (tape) backup job not completed within a specific amount of time can be automatically canceled by a defined maximum time value.
-> No manual intervention after christmas or anyone forgot to replace the medium.
-
- Product Manager
- Posts: 14726
- Liked: 1706 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Thanks! Have you checked the As new backup files appear schedule option - it allows to set the backup window for the tape job (last radio button on the screenshot)
-
- Novice
- Posts: 4
- Liked: never
- Joined: Dec 18, 2015 9:43 am
- Full Name: Helge Hoese
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
the tape job is scheduled with option "After this job". We will try "As new backup files appear" and define a denied period but I think the job is running and waiting for a tape. So defining a denied period will not work, because it will not cancel a running job. Thats why we think we need an option like: enable automatic cancellation after x hours ...
-
- Product Manager
- Posts: 20414
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Yep, even with backup window enabled, the tape job would not be cancelled. So, your voice is heard.
Though, if you have Veeam ONE deployed, I think I'm able to propose a workaround for you.
Thanks.
Though, if you have Veeam ONE deployed, I think I'm able to propose a workaround for you.
Thanks.
-
- Enthusiast
- Posts: 31
- Liked: 7 times
- Joined: Apr 14, 2021 12:25 pm
- Full Name: Chris
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
We're having the same problem. Tape jobs should be cancelled when no tape is present. Is there a solution?
-
- Product Manager
- Posts: 14726
- Liked: 1706 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Hello CH,
There is no UI option for that but possibly you can script such check with PowerShell (i.e. start tape job at the needed day only if tape media is present). Here is the link to PowerShell node related to tape support if you are interested. Thanks!
There is no UI option for that but possibly you can script such check with PowerShell (i.e. start tape job at the needed day only if tape media is present). Here is the link to PowerShell node related to tape support if you are interested. Thanks!
-
- Enthusiast
- Posts: 31
- Liked: 7 times
- Joined: Apr 14, 2021 12:25 pm
- Full Name: Chris
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Thanks for the link. However, I could not find a command to query if or what tape is inserted.
-
- Product Manager
- Posts: 14726
- Liked: 1706 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
-
- Enthusiast
- Posts: 31
- Liked: 7 times
- Joined: Apr 14, 2021 12:25 pm
- Full Name: Chris
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
Hello Dima P.,
many thanks, that did the trick!
Here's my script in case someone else needs to check if there's a tape in the drive:
This script can be referenced in the job's settings.
many thanks, that did the trick!
Here's my script in case someone else needs to check if there's a tape in the drive:
Code: Select all
# Get the tape medium currently loaded in the drive
$TapeMedium = Get-VBRTapeMedium -Drive "Tape0"
# Check if there is a tape in the drive
if ($TapeMedium -ne $null) {
Write-Host "There is a tape in the drive: " $TapeMedium
return $true
} else {
Write-Host "There is no tape in the drive."
return $false
}
-
- Enthusiast
- Posts: 31
- Liked: 7 times
- Joined: Apr 14, 2021 12:25 pm
- Full Name: Chris
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
I'm now running this script after the last disk job. It starts the job named "Backup-to-TAPE" only if a tape is inserted:
Code: Select all
# Get the tape library and tape drive
$TapeLibrary = Get-VBRTapeLibrary -Name "Name-of-Tape-Library"
$TapeDrive = Get-VBRTapeDrive -Library $TapeLibrary
# Get the tape medium currently loaded in the drive
Start-VBRTapeInventory -Library $TapeLibrary -Wait
$TapeMedium = Get-VBRTapeMedium -Drive $TapeDrive
# Check if there is a tape in the drive
if ($TapeMedium -ne $null) {
Write-Host "There is a tape in the drive ""$TapeDrive"": " $TapeMedium
Get-VBRTapeJob -Name "Backup-to-TAPE" | Start-VBRJob
Write-Host "Returned result:"
return $true
} else {
Write-Host "There is no tape in the drive ""$TapeDrive""."
Write-Host "Returned result:"
return $false
}
-
- Product Manager
- Posts: 14726
- Liked: 1706 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
sysinfma,
Thank you so much for sharing the scrip with the community. Glad to read that everything worked out well!
Thank you so much for sharing the scrip with the community. Glad to read that everything worked out well!
-
- Enthusiast
- Posts: 31
- Liked: 7 times
- Joined: Apr 14, 2021 12:25 pm
- Full Name: Chris
- Contact:
Re: Stop tape jobs - Automatic Cancellation feature?
You're very welcome!
I've just got a small update. To prevent the warning "Post-job script timed out" in the job that executes the TAPE script, the parameter "-RunAsync" needs to be added to "Start-VBRJob":
I've just got a small update. To prevent the warning "Post-job script timed out" in the job that executes the TAPE script, the parameter "-RunAsync" needs to be added to "Start-VBRJob":
Code: Select all
# Get the tape library and tape drive
$TapeLibrary = Get-VBRTapeLibrary -Name "Name-of-Tape-Library"
$TapeDrive = Get-VBRTapeDrive -Library $TapeLibrary
# Get the tape medium currently loaded in the drive
Start-VBRTapeInventory -Library $TapeLibrary -Wait
$TapeMedium = Get-VBRTapeMedium -Drive $TapeDrive
# Check if there is a tape in the drive
if ($TapeMedium -ne $null) {
Write-Host "There is a tape in the drive ""$TapeDrive"": " $TapeMedium
Get-VBRTapeJob -Name "Backup-to-TAPE" | Start-VBRJob -RunAsync
Write-Host "Returned result:"
return $true
} else {
Write-Host "There is no tape in the drive ""$TapeDrive""."
Write-Host "Returned result:"
return $false
}
Who is online
Users browsing this forum: No registered users and 4 guests