Retiring tapes?

Everything about backing up to tape

Retiring tapes?

Veeam Logoby willn » Mon May 05, 2014 1:24 pm

OK, so I looked through a lot of the user guide and read forums, but I cannot figure out how a tape gets moved to the retired pool.

Is there a way to do this manually?

The issue I am having is that when a tape starts having problems reading Veeam keeps trying to use it for my jobs and then it ends up taking over 12 hours per job. I need a way to manually mark a tape bad.

I created a custom pool called "Bad Tapes", but when a tape is moved to this pool, it erases the data on it. I don't want this to happen. Any suggestions?
willn
Influencer
 
Posts: 15
Liked: never
Joined: Mon May 07, 2012 1:47 pm
Full Name: William Nelson

Re: Retiring tapes?

Veeam Logoby v.Eremin » Mon May 05, 2014 1:39 pm

We get this information directly from tape device (drive/library). Once a device sees a medium as retired, we automatically place it in the "Retired" media pool, filling "Reason" field in accordance with the gotten information.

It's possible to manually move the given medium to the "Retired" Media Pool. In order to do that you should go to [VeeamBackup].[dbo].[Tape.tape_mediums], choose required medium, and change its "Retired" parameter to 1. After that, you should make tape job use this cassette. Once backup operation touches the tape, it will be automatically placed in the "Retired" Media Pool.

Please, consider this as a unsupported workaround. Use it on your own risk or ask support team for assistance, if you don't feel confident in manual database interactions.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13534
Liked: 1002 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Retiring tapes?

Veeam Logoby willn » Mon May 12, 2014 1:00 pm

If anyone is interested, I wrote a quick powershell script to handle this. Not the best solution, but I would like to put in a feature request to manually retire tapes.

Code: Select all
#Create SQL Connection
$con = new-object "System.data.sqlclient.SQLconnection"

#Set Connection String
$tape = read-host "What tape would you like to retire?: "
$con.ConnectionString =(“Data Source=hostname;Initial Catalog=VeeamBackup;Integrated Security=True”)
$con.open()

$sqlcmd = new-object "System.data.sqlclient.sqlcommand"
$sqlcmd.connection = $con
$sqlcmd.CommandTimeout = 600000
$sqlcmd.CommandText = “UPDATE [VeeamBackup].[dbo].[Tape.tape_mediums] SET retired= '1' WHERE barcode ='$tape'”

try
   {$sqlcmd.ExecuteNonQuery()
   write-host "Tape has been retired."
   }
catch
   {write-host "There was an error!"}
willn
Influencer
 
Posts: 15
Liked: never
Joined: Mon May 07, 2012 1:47 pm
Full Name: William Nelson

Re: Retiring tapes?

Veeam Logoby v.Eremin » Tue May 13, 2014 10:06 am

These forums are monitored for feature requests and potential product enhancements. We tend to implement features based on amount of feedback we receive. So, thank you for sharing both your thoughts and the script. Thanks.
v.Eremin
Veeam Software
 
Posts: 13534
Liked: 1002 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Retiring tapes?

Veeam Logoby slmacquarie » Wed Jun 07, 2017 4:20 am

Is it safe to apply this fix in the opposite case, where we have tapes that are 'Retired' in Veeam, but which are actually fine?

The tapes were incorrectly marked as bad due to a faulty tape drive - it is marking every tape it touches as bad.
slmacquarie
Novice
 
Posts: 9
Liked: 2 times
Joined: Thu Feb 19, 2015 2:33 am
Full Name: Shane Ley

Re: Retiring tapes?

Veeam Logoby einhirn » Thu Jun 08, 2017 7:09 am

Feels like it should be, since the drive is the culprit. You'd just have to change the SQL query in the above script to
Code: Select all
$sqlcmd.CommandText = “UPDATE [VeeamBackup].[dbo].[Tape.tape_mediums] SET retired= '0' WHERE barcode ='$tape'”
einhirn
Enthusiast
 
Posts: 25
Liked: 2 times
Joined: Mon Feb 02, 2015 1:51 pm

Re: Retiring tapes?

Veeam Logoby slmacquarie » Tue Jun 13, 2017 1:53 am

Well, I've given that a go, and it's not the complete solution. The tapes no longer have the broken tape-icon, however they still appear in the Retired Media Pool, and all options in Move to Media Pool are greyed out. I've looked at the sql table, and have discovered differences in the below columns, however, it is not obvious what media_family_id should be set to, as it differs across other members of the 'target' media pool.

media_family_id = N ULL, media_pool_id = 61A..., retension_reason = "The operation...", media_set_type = N ULL

The other entries I can make reasonable assumptions about, eg. updating media_pool_id to match that of the other tapes, nulling out retension_reason, and setting media_set_type to the same as other entries in their target media pool.
slmacquarie
Novice
 
Posts: 9
Liked: 2 times
Joined: Thu Feb 19, 2015 2:33 am
Full Name: Shane Ley

[MERGED] tape rewrites and retirement

Veeam Logoby flury » Wed Jun 21, 2017 7:45 am

Hi Everybody

After how many rewrites will a tape be moved to the retired Pool? Is there a way to show/check the rewrite state of a Tape?

Thanks for answering
flury
flury
Lurker
 
Posts: 1
Liked: never
Joined: Wed Jun 21, 2017 7:27 am

Re: Retiring tapes?

Veeam Logoby v.Eremin » Wed Jun 21, 2017 1:37 pm 1 person likes this post

Kindly, check the information provided above and ask for additional clarification (if needed). Thanks.
v.Eremin
Veeam Software
 
Posts: 13534
Liked: 1002 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to Tape



Who is online

Users browsing this forum: No registered users and 15 guests