Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
ARU
Novice
Posts: 5
Liked: never
Joined: Sep 05, 2011 10:41 am
Full Name: Nick Payne
Contact:

Delete Offline Tapes

Post by ARU »

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
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

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.
ARU
Novice
Posts: 5
Liked: never
Joined: Sep 05, 2011 10:41 am
Full Name: Nick Payne
Contact:

Re: Delete Offline Tapes

Post by ARU »

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
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

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.
ARU
Novice
Posts: 5
Liked: never
Joined: Sep 05, 2011 10:41 am
Full Name: Nick Payne
Contact:

Re: Delete Offline Tapes

Post by ARU »

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?
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

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.
ARU
Novice
Posts: 5
Liked: never
Joined: Sep 05, 2011 10:41 am
Full Name: Nick Payne
Contact:

Re: Delete Offline Tapes

Post by ARU »

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

So theres no way to remove these?
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

The script I've posted above should delete all offline cassettes from backup console. Have you tried it already? Thanks.
ARU
Novice
Posts: 5
Liked: never
Joined: Sep 05, 2011 10:41 am
Full Name: Nick Payne
Contact:

Re: Delete Offline Tapes

Post by ARU »

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.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

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.
Dima P.
Product Manager
Posts: 14720
Liked: 1705 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: Delete Offline Tapes

Post by Dima P. »

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.
Max Dembo
Novice
Posts: 5
Liked: never
Joined: May 30, 2012 7:12 pm
Full Name: Max Dembo
Contact:

Re: Delete Offline Tapes

Post by Max Dembo »

Hello,
is the above script valid in version 8?
I have to delete a lot of offline tapes.
Thanks.
veremin
Product Manager
Posts: 20406
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Delete Offline Tapes

Post by veremin »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests