Skip to main content

Hello,

Is there a script that prevents a tape from being reused? 

Only script i found was the mark tape full, but that doesn´t assure me that the tape won’t get used once the data in it expires.

I have around 12k tapes that i need to prevent reuse and doing it via GUI doens’t seem to be very workable.

Any ideas?

 

Kind regards,

Amaral

Have you tried qcommand where you can add a list of bar codes and maxime the number of tapes at once?

https://documentation.commvault.com/11.24/expert/11371_qmedia_markfull.html

qmedia markfull -b <barcode(s)> [-af <argsfile>] [-tf <tokenfile>] [-tk <token>] [-h]

 

If those tapes have been used a while back, I do not think you would have problems with the statement below (2min rule) and so you could potentially just insert them back and start running the command to a list of tapes.

  • This option marks media full, 2 minutes after the completion of the backup/archive operation. If any jobs are initiated within the 2 minutes, they are allowed to write to the media. If the job was associated with the prior media, new media (such as a new tape) will be used for subsequent jobs. (Applies to all backup/archive types.)

https://documentation.commvault.com/11.24/expert/57749_advanced_backup_options_media.html

 


@dude but once the data is expired on that media, it goes back to the scratch pool and i want to avoid that.


What is the retention configuration you are using on the storage policy for that particular tape job? can you change that?

A bit confused as you want to mark the media full and do not want to write data to it anymore, yet there seems to be a retention period that expires.


What i need is to prevent reuse of assigned media and to make sure that no data is written on those tapes. I could do prevent reuse 1 by 1, but i have 12k tapes to do that...


I do not have a written script, I believe qcommand could help or perhaps selecting the media in question and marking as "Prevent Reuse” then moving it to tehe “Overwrite Protect Media Pool”

https://documentation.commvault.com/11.24/expert/11941_saving_aged_data.html

Overwrite Protect Media

https://documentation.commvault.com/11.24/expert/10414_media_by_groups.html#b10418_overwrite_protect_media

Media Recycling

https://documentation.commvault.com/11.24/expert/10462_media_recycling.html

 


So my only option is to go click  1 by 1 on the 12k tapes… ok thank you anyway


Or you can just select all CRTL + A, Right Click, ALl Tasks, Prevent Reuse. That will work too.

 


the barcodes are not sequential unfortunately..


@jmiamaral , late to the party (was on holiday), though I’d like to help.

Do you have a list of the barcodes in a text file (so you can use command line options to move them to the protected pool)?

I know we have some scripts to modify retention (so you could mass change jobs), so we just need to figure out what data you have (i.e. a text file of barcodes) to see what options we have.


@Mike Struening yes i have a list with the barcode.


Let me see if I can get you an answer.  Give me a bit; I’m sure I can find you something!


@jmiamaral , I spoke to the top developers who own these features, and there is currently no option to do this via command line.

I took the liberty of creating a CMR in your name (341770) and assigned it to your main CommCell.

Unfortunately, that means there’s no option (for now) other then what @dude suggested.


@Mike Struening Ok thank you.


Reply