cancel
Showing results for 
Search instead for 
Did you mean: 

bpexpdate fails with unhelpful error message

dennis_sexton
Level 5
Have tapes that are set to retention level of infinity. I want to reclaim
them to be writable at a new retention level.

bpexpdate -m 000782 -d 0
Are you SURE you want to delete 000782 y/n (n)? y
could not deassign media due to Media Manager error

Well I realize I don't want to delete the tape, but I certainly understand
the man page to say if -d 0 is specified, the backup or media is expired
immediately. But I interpret the error message that I am also trying
to to -deassignempty.

if I try bpexpdate -m 000782 -d 12/20/2005
I get Invalid start date: 12/20/2005

The man page says nothing about giving two dates. What does this
message mean?

If I also include the hour in the command:
#> bpexpdate -m 000782 -d 12/20/200517:25:00
Are you SURE you want to change 782
to expire on Mon Jan 18 2038 19:14:06 y/n (n)? n

I don't want it to expire in 2038, obviously.

I'm sure there must be some magical incantation I'm missing.
Please help.
5 REPLIES 5

Stumpr2
Level 6
The magical incantation is "recalculate"

-recalculate

Allows the expiration date of backups to be changed
based on the specified retention level or you can
specify a new expiration date. When the expiration is
changed according to retention level, the new date is
calculated based on the creation date of the backup
plus the value of the retention level. The expiration
can be changed for a single backup, or for all backups
for a particular client, policy, or schedule type.

bpexpdate: -recalculate



legal values for sched: 0=full,1=differential incr,2=user,3=arch
4=cumulative incr

Phani_Kiran
Level 3
Aah... its always a good idea to specify the media server name. Try this and it might work.

Cheers,

zippy
Level 6
Dennis,

Expire a tape "NOW".....

bpexpdate -ev ${TAPE_NUMBER} -d 0

J

Stumpr2
Level 6
Dennis,

I didn't see this earlier
..could not deassign media due to Media Manager error

Check to see if you are getting an error 94.
If so then....
Media Manager error 94: "Volume not in specified pool" - scenarios and solutions
http://seer.support.veritas.com/docs/247898.htm

dennis_sexton
Level 5
I did check through the logs and found error 94 messages,
presumably for the original
bpexpddate -M 000782 -d -0

I do not have a multi-media server environment however. Master
and media server are one and the same.

As a result I redid the
bpmedialist -M mastername -m 000782 -d 0
vmquery -deassignbyid 000782 4 0

since the tape was in pool number 4

Interestingly, a vmquery said the tape was in the scratch pool but
by the time I ran available_media, the tape was back in the netbackup
pool. Its retention level was still infinity, which is biggest problem for
me. A bpimmedia showed one image on the tape.

I then tried this.

##> bpexpdate -recalculate -backupid client_1101610140 -d 0 -ret 7 -M master_server
Are you SURE you want to recalculate expiration dates on all images
that meet the following criteria:
backupid client_1101610140
retention will be changed to 7(9 months)

to expire NOW
Continue?(y/n)y

So this looked good. Alas available_media then indicated the tape
is still at retention level 9 (infinity).

Another bpimmedia failed with allocation failed message.

Looking at the doc Bob suggested, I ran bpmedialist -mcontents.
That discovered 14 backup images on the tape, not just one.
So this must be the problem, there is mismatch between the mediadb
and what is actually on the tape? Am going to try again on all of
the images to see what happens.