04-02-2012 06:19 PM
as above
Symantec Netbackup Enterprise Server 7.0 to remove all backup tapes retention is there a way?
I am on Windows 2008 R2.
I google and found bpexpdate but i tried to insert it into MS-DOS it doesn't respond.
i have alot of tapes on wrong retention period, is there a way to remove and reset them all (data is not important) as back to brand new tapes?
thanks
Solved! Go to Solution.
04-03-2012 01:53 AM
Also, if you do not have media sharing you will need to add -host followed by the media server that owns the tape.
The below is a quick way to sort you out but do note that this will remove all data from your NetBackup installation - ALL GONE! If you need to change the retention period you can do that with a different command. Again in the below if there are just some tapes involved then just select thos and not everything - I do not want you to loose everything - this is for yoru guidance only - so here goes ...
Quick way is to go into the admin console to the Media Section where you can view all of your media. Right click on the top column and select Columns - Layout.
Select to show the Media Owner and Time Assigned and then sort the columns so that MediaID is first and Media Owner is next.
Next sort by time assigned. Highlight all tapes that have a time assigned and use CTL-C to copy them.
Open Excel and CTL-V - they drop in nicely!
In Excel sort by Media Owner - for my example i will call the first owner media1 and the next media2 so just substitute for your real names below.
Create a new folder on the Master Server somewhere and in it create as many text files as you have media servers (media owners). Name each one similar to media1_tapes.txt. Highlight the Media ID of all tapes owned by media1 and paste into the matching text file.
Repeat for each media owner
Next male another text file in that directory and rename it to tape_expiry.bat.
Right click it and select "edit" to open it and then paste in the following:
for /f %%a in (media1_tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpexpdate" -m %%a -d 0 -host media1 -force
for /f %%a in (media2_tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpexpdate" -m %%a -d 0 -host media2 -force
pause
Note that in the above each is on a single line and if you have NetBackup installed in a different location you will need to change the path to the bpexpdate command as well as changing the media server names shown.
Double clicking the .bat file will churn through all of your tapes and expire them without any prompting - again I stress that following my notes above will wipe all of your data from NetBackup so if only some tapes are involved select those only to place in the text files.
If you just want to change their retention periods then there are other ways to do that as well
Hope this helps
04-02-2012 07:58 PM
There is no easy command to expire all images on tapes in your environment. This request is not common. I can't say that I know anyone who isn't in a test environment that doesn't care about the data they have on tapes.
Having said that, bpexpdate is the only command we have that will change the expiration of images. For your use case, it's not great, but it's the best supported command we have to do what you're after.
04-02-2012 08:06 PM
hi, thanks for the reply.
how do i execute it? in command prompt ?
04-02-2012 09:29 PM
Open Command Prompt with right-click, Run As Administrator.
cd to <install-path>\veritas\netbackup\bin\admincmd
Command usage:
bpexpdate -m <media-id> -d 0
You will need to run the above for each media-id containing valid backups.
04-03-2012 01:53 AM
Also, if you do not have media sharing you will need to add -host followed by the media server that owns the tape.
The below is a quick way to sort you out but do note that this will remove all data from your NetBackup installation - ALL GONE! If you need to change the retention period you can do that with a different command. Again in the below if there are just some tapes involved then just select thos and not everything - I do not want you to loose everything - this is for yoru guidance only - so here goes ...
Quick way is to go into the admin console to the Media Section where you can view all of your media. Right click on the top column and select Columns - Layout.
Select to show the Media Owner and Time Assigned and then sort the columns so that MediaID is first and Media Owner is next.
Next sort by time assigned. Highlight all tapes that have a time assigned and use CTL-C to copy them.
Open Excel and CTL-V - they drop in nicely!
In Excel sort by Media Owner - for my example i will call the first owner media1 and the next media2 so just substitute for your real names below.
Create a new folder on the Master Server somewhere and in it create as many text files as you have media servers (media owners). Name each one similar to media1_tapes.txt. Highlight the Media ID of all tapes owned by media1 and paste into the matching text file.
Repeat for each media owner
Next male another text file in that directory and rename it to tape_expiry.bat.
Right click it and select "edit" to open it and then paste in the following:
for /f %%a in (media1_tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpexpdate" -m %%a -d 0 -host media1 -force
for /f %%a in (media2_tapes.txt) do "C:\Program Files\veritas\netbackup\bin\admincmd\bpexpdate" -m %%a -d 0 -host media2 -force
pause
Note that in the above each is on a single line and if you have NetBackup installed in a different location you will need to change the path to the bpexpdate command as well as changing the media server names shown.
Double clicking the .bat file will churn through all of your tapes and expire them without any prompting - again I stress that following my notes above will wipe all of your data from NetBackup so if only some tapes are involved select those only to place in the text files.
If you just want to change their retention periods then there are other ways to do that as well
Hope this helps