Delete Offline Tapes

Everything about backing up to tape

Delete Offline Tapes

Veeam Logoby ARU » Mon Nov 25, 2013 4:27 am

Hi,

Do you have a script I can use to delete all offline tapes rather than use the GUI to delete them on at a time?

Thanks,

Nick
ARU
Novice
 
Posts: 5
Liked: never
Joined: Mon Sep 05, 2011 10:41 am
Full Name: Nick Payne

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Mon Nov 25, 2013 9:41 am

It's not that clear what you've meant by "delete tapes". Are you after removing offline tapes from a catalog? If so, then, the following script might help:

Code: Select all
asnp VeeamPSSnapin
foreach ($Medium in Get-VBRTapeMedium | where {($_.isoffline -eq "$True")})
{
$Medium.Delete()
}


Hope this helps.
Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Delete Offline Tapes

Veeam Logoby ARU » Tue Nov 26, 2013 3:50 am

Hi,

Firstly, thanks for coming back to me so quickly, appreciated!

Not quite the issue I have, thousands of drives where created when I attached Veeam to our VTL and I would like to delete them. See below;

Get-VBRTapeDrive

Name Display Name Model State Enabled
---- ------------ ----- ----- -------
IBM ULT3580-TD5 SCSI S... Empty True
LTO Tape drive Empty True
LTO Tape drive Empty True
IBM ULT3580-TD5 SCSI S... Empty True
LTO Tape drive Empty True
LTO Tape drive Empty True
IBM ULT3580-TD5 SCSI S... Empty True
IBM ULT3580-TD5 SCSI S... Empty True
ARU
Novice
 
Posts: 5
Liked: never
Joined: Mon Sep 05, 2011 10:41 am
Full Name: Nick Payne

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Tue Nov 26, 2013 9:40 am

Hmm, not sure whether I quite follow you on that.

You've attached the said VTL appliance to the VB&R management server and, meanwhile, you don't want for corresponding drives to be shown in GUI, right? Or it's more about library being shown wrongly as a bunch of standalone drives?

Anyway, you can disable VB&R scan/recognition of tape libraries/standalone drives using DisableTapeSubsystem regkey.

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

Re: Delete Offline Tapes

Veeam Logoby ARU » Wed Nov 27, 2013 2:48 am

Veeam doesn't recognize the VTL Robotic and mounts the tape drives as standalone drives. Each time Veeam scans the drives it adds a new set of drives. I think half of the battle is to disable the automated scan with the regkey. The next, is how do I remove all of the drives?
ARU
Novice
 
Posts: 5
Liked: never
Joined: Mon Sep 05, 2011 10:41 am
Full Name: Nick Payne

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Wed Nov 27, 2013 9:29 am

From my perspective, the first thing to investigate should be the tape library improper recognition. Usage of drivers provided by software vendor and presence of other tape backup software running on the same machine are the typical causes of this behavior. So, you might want to check it first.

Also, it doesn't seems that there is an way to delete tape drive/library using either GUI or PS snap-in. However, if it's acceptable, you can disconnect the said library from this machine, thus, no libraries/drives won't be shown even in Windows Device Manager.

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

Re: Delete Offline Tapes

Veeam Logoby ARU » Thu Nov 28, 2013 3:36 am

I've disconnected the library and drives however, I still have 5000+ offline tapes showing :$

So theres no way to remove these?
ARU
Novice
 
Posts: 5
Liked: never
Joined: Mon Sep 05, 2011 10:41 am
Full Name: Nick Payne

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Thu Nov 28, 2013 9:13 am

The script I've posted above should delete all offline cassettes from backup console. Have you tried it already? Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Delete Offline Tapes

Veeam Logoby ARU » Wed Dec 04, 2013 10:52 pm

Yes, I ran the script however, the script deletes tapes rather than the tape drives I'm trying to remove. I tried to modify the script to use Get-VBRTapeDrive and remove the medium component, but no luck.
ARU
Novice
 
Posts: 5
Liked: never
Joined: Mon Sep 05, 2011 10:41 am
Full Name: Nick Payne

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Wed Dec 11, 2013 1:29 pm

Oh, I must have been confused by your statement regarding offline tapes.

If after disconnecting corresponding tape library from a backup console, and restarting the backup management server, you still have standalone drives shown in the GUI, then, the best way would be to open a case with our support team and let them assist you in clearing everything up.

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

Re: Delete Offline Tapes

Veeam Logoby Dima P. » Mon Dec 16, 2013 9:09 pm

Nick,
Currently, deletion of all offline tape libraries/drives possible thru the SQL query - removing all the records in the corresponding tables of the VBR database, however, this is not recommended for production. So if you got up to 10 offline drives, I would strongly recommend to delete all of them manually – if you have hundreds of offline drives, as it was noted before, please, contact support team in order to get the appropriate fix. Thank you.
Dima P.
Veeam Software
 
Posts: 6253
Liked: 440 times
Joined: Mon Feb 04, 2013 2:07 pm
Location: SPb
Full Name: Dmitry Popov

Re: Delete Offline Tapes

Veeam Logoby Max Dembo » Mon Apr 13, 2015 8:50 am

Hello,
is the above script valid in version 8?
I have to delete a lot of offline tapes.
Thanks.
Max Dembo
Novice
 
Posts: 5
Liked: never
Joined: Wed May 30, 2012 7:12 pm
Full Name: Max Dembo

Re: Delete Offline Tapes

Veeam Logoby v.Eremin » Mon Apr 13, 2015 10:04 am

Nope, in version 8 the said method isn't present in tape medium object any longer. So, you can either shift select all mediums and remove them from catalog or ask support team for assistance in clearing those entities from product DB via SQL commands. Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 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 7 guests