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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to reset media expiry date back after extending to infinity

Status
Not open for further replies.

NBMike

Technical User
Apr 1, 2005
25
GB
Hi, we intentionally set the retention period of a bunch of tapes to infinity using the "bpexpdate -ev <tapeID> -d infinity command".

Now we want them to be reset back to the original expiry dates (a 3 month retention).

I've reset the expiry dates of the backups back to 3 months using "bpexpdate -recalculate -backupid <backupid> -ret 5", which has set the IMAGES expiry date back to what they were, which is fine, but I notice the expiry date of the MEDIA is still 1/1/2038...in other words, the backups will expire from the images database, but the tapes will never expire from the media database, so we'll end up with lots of tapes sitting there, with no valid backups on them, unavailable for use.

Is there a command (or bpexpdate option) that I can use to change the expiry date of the media back to match the expiry date of the longest-kept backup image on that media? Without me having to manually work out and enter a specific date? There are too many tapes for me to have to do it manually...

TIA
M
 
Don't confuse the expiry of the images with the expiry of the tapes. You have done the correct thing. When the expiray of the images was changed then the tapes would need to change to ensure they don't expire before the images. But when you changed the images back again there is no process which needs the tapes to be changed back as well. Remenber this is just about when the tape is too old to use and should be bined.
 
Hi..I'm definitely not referring to the expiry date of the physical volume in the volume database (ie. the expiry date we see in media and device management)...the physical expiry date isn't part of my problem....

I'm referring to the expiry date of the media in the media database (ie. the expiry date I see in the media list report) versus the expiry date of the images (ie. the expiry date I see in the images on media report)....I'm trying to find a way to set the expiry date in the media database (media list report) to be equal to the furthest expiry date of all the images on that tape in the images database (images on media report).

Thanks

M
 
I understand you perfectly well. What you can do to change the expiry date of the media is to use the bpexpdate command with the -m switch and then provide the media ID of your volume, for example:
bpexpdate -m <media_id> -ret 5 -force
or:
bpexpdate -m <media_id> -d <Date> -force

Let me know
 
Hi, thanks for the reply.

bpexpdate -m <media_id> -ret 5 -force

was the first thing I tried, that would be the answer to all my problems, but apparently one can't use the -m parameter with the -ret parameter at the same time, it doesn't work...eg (note the allowed parameter combinations):

D:\veritas\NetBackup\bin\admincmd>bpexpdate -m 000046 -ret 5 -force
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
invalid command usage


I know the second command you provided will work, but I'm trying to get away from having to manually work out and specify the correct expiry date for each tape, that's my problem! I have many tapes to do this on.

M

 
Have you compared "the expiry date of the physical volume in the volume database" and "the expiry date of the media in the media database" are they the same?

"but the tapes will never expire from the media database, so we'll end up with lots of tapes sitting there, with no valid backups on them, unavailable for use."

Why would that happen? Once all the images on a tape have expired the tape can be reused as long as the expire date of the tape is not passed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top