cancel
Showing results for 
Search instead for 
Did you mean: 

Symantec Netbackup Enterprise Server 7.0 to remove all backup tapes retention

nanochan
Level 3

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

1 ACCEPTED SOLUTION

Accepted Solutions

Mark_Solutions
Level 6
Partner Accredited Certified

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
 

View solution in original post

4 REPLIES 4

Jed_Gresham
Level 4
Employee Accredited

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.

nanochan
Level 3

hi, thanks for the reply.

how do i execute it? in command prompt ?

Marianne
Level 6
Partner    VIP    Accredited Certified

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.

Mark_Solutions
Level 6
Partner Accredited Certified

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