Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the expiration date of an tape.....plus

Status
Not open for further replies.

wallacealex

Technical User
Mar 19, 2002
21
0
0
ZA
I have my current set of Monthend Backups with a retention period of 6 months. I need to set the retention period to infinity.

Although I have changed the tapes to infinity, the images still show expiration as 6 months.

Would appreciate it if somebody can give me the correct procedure,(commands included), step by step how to go about achieving this.

Running Netbackup Data Centre 4.5 OS Windows 2000

Appreciated
 
There are two different retentions. The first that is done through the GUI is for the physical retention of the tape regardless of images that are on it. It is used when you want to no longer use a tape that has been in use for the specified time. I never use the physical retention. I use a tape until it reports an error and then I destroy it.

The other way is to set the tape retention through the use of the bpexpdate command. It can be done for the entire tape or it can be done for individual images.

bpexpdate: -m <media id> -d <mm/dd/yyyy HH:MM:SS | 0 | infinity>
[-host <name>] [-force]
[-M <master_server,...,master_server>]
bpexpdate: -deassignempty [-m <media id>] [-host <name>] [-force]
[-M <master_server,...,master_server>]
bpexpdate: -backupid <backup id> -d <mm/dd/yyyy HH:MM:SS | 0 | infinity>
[-client <name>] [-copy <number>] [-force]
[-M <master_server,...,master_server>]
bpexpdate: -recalculate [-backupid <backup id>] [-copy <number>]
[-d <mm/dd/yyyy HH:MM:SS | 0 | infinity>] [-client <name>]
[-policy <name>] [-ret <retention level>] [-sched <type>]
[-M <master_server,...,master_server>]
legal values for sched: 0=full,1=differential incr,2=user,3=arch
4=cumulative incr

Bob Stump
Just because the VERITAS documentation states a certain thing does not make it a fact and thats the truth
 
Thanks Bob, but the problem I am having is that I need to change a complete set of my Monthly tapes (which is about 60 tapes)to infinity. Like I said, I used the bpexpdate command to change a few tapes to infinity, but the images still says ('expire in 6 months). The question is, why if the tapes are set to infinity does the images not ? Because to change individual images will take forever.

Thanks
 
There are several different ways to use this as explained in this technote.
DOCUMENTATION: Ways to change expiration date (retention levels) of media and backup IDs

Manual: NetBackup (tm) 5.0 Commands for UNIX
Page: 88 - 93

Manual:NetBackup DataCenter (tm) 4.5 System Administrator's Guide for UNIX
Page: 561 - 566

Modification Type: Addition

Modification:

Frequently, it is required to keep a backup longer, keep it for less time, or just get rid of it. To make changes to the expiration date of tapes, the command bpexpdate is used.

Note: For the bpexpdate -recalculate command:
If the backup is on removable media, the expiration date of the media ID in the media catalog is changed, provided the expiration date on this command is greater than the current expiration of the media ID.

There is this description in the following manual:
NetBackup (tm) 5.0 Commands for UNIX Page: 89
NetBackup DataCenter (tm) 4.5 System Administrator's Guide for UNIX Page: 562


When the retention level is set or changed, it generates the length of time that the backup will remain in the database before it is expired. That expiration date is calculated by adding the length of the retention level to the date of the backup. For example, if the date of the backup is 10/31/76, and the retention level is 2 ( 3 weeks), the backup will expire on 11/21/76.

Here is a list of the default retention levels:

Retention Retention Equivalent
Level Period Days
--------- ----------- ----------
0 1 week 7
1 2 weeks 14
2 3 weeks 21
3 1 month 31
4 2 months 62
5 3 months 93
6 6 months 186
7 9 months 279
8 1 year 365
9 infinity


The use of bpexpdate is quite straightforward. Following is a list of the options related to changing expiration dates and retention levels, along with some examples.

To re-calculate the expiration date of a specific backup ID based on retention level:
/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -backupid clear_0988403420 -ret 4 <<-- That number is the retention level.

To do the same with all images from a class:
/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -class Hotdog.Class -ret 0

NOTE: For NetBackup 4.5 and later, the -class switch has been changed to -policy. Both options will currently work, but -class may be removed at any time.

To specify the specific expiration date, use -d <date> instead of -ret:
/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -backupid clear_0988403420 -d 10/31/01

To do it by media ID, an expiration date has to be used:
/usr/openv/netbackup/bin/admincmd/bpexpdate -ev A00010 -d 10/31/01
(This will change the expiration date for all the images on the tape.)

NOTE: For NetBackup 4.5 and later, the -ev switch has been changed to -m. Both options will currently work, but -ev may be removed at any time.

To change the expiration date so that it never expires:
/usr/openv/netbackup/bin/admincmd/bpexpdate -ev A00010 -d infinity

Or to expire all images on that tape:

/usr/openv/netbackup/bin/admincmd/bpexpdate -ev A00010 -d 0
(This will remove all the backup images on this tape from the database, this is not something that should be used under normal circumstances.)


Bob Stump
Just because the VERITAS documentation states a certain thing does not make it a fact and thats the truth
 
Hi Bob
I really appreciate your thorough response to my question, but I should have told you from the onset that I am running a W2K server using Veritas 4.5.

I see your reply relates to Unix.

Secondly I feel so guilty wasting your time because from the responses posted I can see you are a very busy person.

Apologies once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top