NetBackup 7 - How to display data expiration on a disk image
Updated: 27 Sep 2011 | 6 comments
This issue has been solved. See solution.
Hello,
On tape media, I use the following command to change the expiration date on the volume:
bpexpdate -m TPS135 -d 12/31/2015 18:00:00
Then I am able to display the info changed by using the following command
nbemmcmd -listmedia -mediaid TPS135
On disk backup media, I use the following command to change the expiration date on the backup id:
bpexpdate -backupid server1_1233211234 -d 12/31/2015 18:00:00
My question, how do I display the information which was changed so that I know that this backup image will not expire until: 12/31/2015 18:00:00 ???
Thank you,
Discussion Filed Under:
Comments
bpimagelist?
DOCUMENTATION: What are the different fields in "bpimagelist -l" output?
http://www.symantec.com/business/support/index?pag...
You will need field 16 of the IMAGE entry
e.g.
# bpdbm -ctime `bpimagelist -l -backupid client_1316242916|grep IMAGE|awk '{print $16}'`
1318921316 = Tue Oct 18 08:01:56 2011
where the bpimagelist output produces a value of 1318921316 & this is fed into bpdbm to convert to a more readable format.
***EDIT***
To follow that theory through with your example:
# bpdbm -ctime `bpimagelist -l -backupid client_1316694010|grep IMAGE|awk '{print $16}'`
1317298810 = Thu Sep 29 13:20:10 2011
#
# bpexpdate -backupid client_1316694010 -d 12/31/2015 18:00:00
Are you SURE you want to change client_1316694010
to expire on Thu Dec 31 18:00:00 2015 y/n (n)? y
#
# bpdbm -ctime `bpimagelist -l -backupid client_1316694010|grep IMAGE|awk '{print $16}'`
1451584800 = Thu Dec 31 18:00:00 2015
***EDIT #2***
[[As an aside, as you look like you want to view this via command line, this can also be confirmed via the Client Backups report in the GUI - also gives the equivalent output to bpimagelist ]]
Regards Andy
"It's not too late to panic ..."
Expiration dates of media vs. image are not the same
Do you know that changing the media expiration date has no effect on the images stored on that media? If your goal is to change the expiration date of an image, whether on disk OR tape, you still need to use the second format "bpexpdate -backupid...".
The first version of the command you listed "bpexpdate -m..." ONLY affects the last date the tape will ever be used for writing further backups, either appending more data to them or if all previously written data expires. This is because tapes have a basic "shelf life" before they have trouble recording new data, and many installations don't want to trust writing data to a tape that may have been sitting in a slot for a few years.
If all you did was change the media expiration date, your images will still expire from the NBU catalog on their original expiration date, no mattter what the media expiration date is.
Think I have to disagree with you on that Ron.
bpexpdate -m media_id will affect ALL backup_ids on said media:
Are you thinking of vmchange?
Change volume expiration date
/usr/openv/volmgr/bin/vmchange [-h EMM_server | volume_database_host] -exp date -m media_id
e.g.
# bpdbm -ctime `bpimagelist -l -backupid client_1316759309|grep IMAGE|awk '{print $16}'`
1317364109 = Fri Sep 30 07:28:29 2011
# bpdbm -ctime `bpimagelist -l -backupid client_1316759498|grep IMAGE|awk '{print $16}'`
1317364298 = Fri Sep 30 07:31:38 2011
#
# bpexpdate -m 300203 -d 12/31/2015 18:00:00
Are you SURE you want to change 300203
to expire on Thu Dec 31 18:00:00 2015 y/n (n)? y
#
# bpdbm -ctime `bpimagelist -l -backupid client_1316759309|grep IMAGE|awk '{print $16}'`
1451584800 = Thu Dec 31 18:00:00 2015
# bpdbm -ctime `bpimagelist -l -backupid client_1316759498|grep IMAGE|awk '{print $16}'`
1451584800 = Thu Dec 31 18:00:00 2015
# vmquery -m 300203 | grep expiration
expiration date: ---
# vmchange -exp 12/31/2015 18:00:00 -m 300203
# vmquery -m 300203 | grep expiration
expiration date: Thu Dec 31 18:00:00 2015
Regards Andy
"It's not too late to panic ..."
Eeek! Andy is right!
I just looked through the docs on the bpexpdate command again. Andy is 100% correct, and I was 100% wrong. Ignore me on this one! :)
Did this give you the info
Did this give you the info you wanted?
Regards Andy
"It's not too late to panic ..."
It worked, Thank you Andy!
It worked, Thank you Andy!
Would you like to reply?
Login or Register to post your comment.