09-01-2011 04:31 AM
Hi all,
I need a script that expires more than one Tape at a time.
Any idea?
The CMD command to expire one tape is:
C:\Program Files\Veritas\NetBackup\bin\admincmd\bpexpdate -m XXXXL4 -d 0
xxxx - letters and numbers.
Regards,
Marius D.
Solved! Go to Solution.
09-01-2011 08:48 AM
@echo off
for /f %%t in (tapelist.txt) do call "C:\Program Files\VERITAS\NetBackup\bin\admincmd\bpexpdate.exe" -m %%t%1 -d 0 -force
but at the end when all tapes are expired, i want to receive a confirmation
ideas?
09-01-2011 06:16 AM
works on one volume at a time. You could create a for loop to handle multiple volumes:
for %v in (vol1 vol2 vol3) do C:\Program Files\Veritas\NetBackup\bin\admincmd\bpexpdate -m %v -d 0
09-01-2011 06:49 AM
i found this https://www-secure.symantec.com/connect/forums/scr...
i like the J.Hinchcliffe. idea but i would like to have just a bat file and this tapelist.txt file.
How to write the expire.bat and expiremore.bat (from J.H. example) just in one file?
09-01-2011 06:50 AM
.
09-01-2011 07:20 AM
I could write the loop for unix and have in the past.
Just not that good with windows scripting to write the loop to read in a txt file
09-01-2011 08:48 AM
@echo off
for /f %%t in (tapelist.txt) do call "C:\Program Files\VERITAS\NetBackup\bin\admincmd\bpexpdate.exe" -m %%t%1 -d 0 -force
but at the end when all tapes are expired, i want to receive a confirmation
ideas?
09-01-2011 10:57 AM
for interactive operation
09-01-2011 12:27 PM
If I can come in at this point and ask WHY do you need to bulk-expire tapes?
Retention periods are there because of business requirements. Experience has taught us that a restore is requested shortly after manual premature expiration..............
Use the need to expire tapes as motivation to purchase more media.
09-01-2011 04:25 PM
Adding to Mariannes excllent post ...
... she is correct, there shoud be no need to be regularly (not that you say for certain this is a regular procedure) manually expiring tapes, this is 'micro-managing' the media, which is what NBU is for.
If you really have a need for this, be very very careful - I had a case a while ago where the incorrect media was expired, 100's of tapes ...
So, please please bear this in mind, Symantec do not recommend this, and, if you lose data, there is nothing we can do about it.
Martin
09-01-2011 11:20 PM
i need the script just to expire some copy backup tapes (not the primary copy) while i need to purchase more tapes.
other ideas with this script?
09-02-2011 12:02 PM
add a second for loop tht does this command
"C:\Program Files\VERITAS\NetBackup\bin\admincmd\bpmedialist.exe" -m %1
if it comes back with any out other than it is not in the database than the tape did not expire.
If I had time I could do better but this is what I have off the top of my head.