cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Using bpexpdate -recalculate

Hello!

I want to reduce the retention period of a policy and see if I'm able to reclaim tapes. Can I use the bpexpdate to recalculate expirations, then see which tapes are expired and ready for re-use? How do I get around the dreaded "must be superuser to execute" error?

Thanks!

Shawn

Tags (2)
9 Replies
Highlighted

Re: Using bpexpdate -recalculate

@shawntabat 

It is never a good idea to reduce retention just because you are short of tapes.
Rather request more tapes.

Retention levels were chosen for a reason - you have a duty to your company to be able to restore any data that was backed up, up to the expiration date.

If you still want to reduce retentions, bear in mind that ALL images on a tape must expire before a tape can be re-used (overwritten). You might not free up any tapes by reducing retention for certain policies, especially where more than one policy wrote to the same tape (same retention, same pool).

Please have a look at this excellent blog: Understanding how NetBackup writes to a tape.

Highlighted

Re: Using bpexpdate -recalculate

Good morning Marianne,

I agree with you 100%! However, I must apologize, I should have added a little more context to the question.

The previous admin set all of our retention to 10 years for our fileshares and SOX data and 30 years for our HIPAA data. While this is very close to the lawful requirements, we had an approval to reduce our retention for fileshares down to 18 months.

I also agree to your point about expiring all images on the tapes--I've told my management that we write many images to the same tapes, and sometimes across multiple tapes, so the likelihood of getting a single tape "freed up" is pretty slim without losing data somewhere else. I more or less wanted to prove this to them.

-Shawn

Highlighted

Re: Using bpexpdate -recalculate

I've done some cleanup stuff like this (stuff that should have been 7 year was set to infinite) and Marianne is 100% on target here.

It IS possible to recalculate enough stuff to clean up some tapes, but I would do it the other way around: start from a particular tape, inventory it to see what policies/clients wrote to it and then expire based off of that info.

It would be a hassle and a fair amount of work but it's possible unless you have too many policies/other stuff mixed onto the tapes.  If it's just a few policies that use those retentions and you aren't configured to mix retentions on tapes (very uncommon, not a default setting), you might be able to make some headway.

If this is just to generate scratch tapes though (and avoid buying new), yeah, just buy some new ones.  You probably don't want to be re-using 10 year old tapes; their reliability would be lower than new ones.

Highlighted

Re: Using bpexpdate -recalculate

@DPSafelite 

We have over 400 policies and 7,000+ tapes in inventory. Fortunately, they all use one of five retention policies, though they aren't data specific. Don't ask me why--I inherited this.

Highlighted

Re: Using bpexpdate -recalculate

Ha!

Well, welcome to backups, the redheaded step-child of IT Infrastructure!

Highlighted

Re: Using bpexpdate -recalculate

In the last week, I was able to recalculate retention on our NDMP backups by using:

bpexpdate -recalculate -policy (policyname) -retention (retention level of 2 years)

This was applied to our policies and I still need to recalculate the expiration for the tapes.

Highlighted

Re: Using bpexpdate -recalculate

You are confusing "expiration of media" (i.e. physical expiration) with "expiration of contents of media" (i.e. logical expiration).  The bpexpdate that you have already issued will have logically adjusted the expiration date of previously saved backup images, not the policies, and technically will have had no effect on media "physical expiration".  N.B.  most poeple, most sites, do not bother to implement physical "media expiration", and so I doubt that you have too.  So, my point then is this... to try to highlight to you that NetBackup admins rarely talk about "media expiration", but we always talk about "image expiration".

After adjusting "image expiration" (i.e. "logical expiration" of "images on media") (be it tape media, or disk media), then normally any empty tapes will return to scratch pool within 24 hours of the last remaining image having been "logically expired".  i.e. assuming that your environment is setup correctly then you should not need to also manage (i.e. "logically expire") the cotents of media too.

Quite a few sites make the mistake of trying to micro-manage NetBackup.  NetBackup is able to take care of itself and its media and it capacity and it expirations and media rotations perfectly well, if it has been sized/scoped/designed/implemented well.

Highlighted

Re: Using bpexpdate -recalculate

N.B:  One word of advice... if you have multiple copies of images (e.g. a copy on disk, and a copy on tape) (or perhaps two copies on tape but with different retentions)... then... you really really really want to be careful about what you are doing and read, and re-read, the manuals around image expiration and the handling of copy numbers -    WARNING: the copy numbers are not necessarily always what you think they should be.  Always do detailed research before manually manipulating the expiry date of images which have multiple copies.  The question to ask yourself is this:  Are you really sure that you really do have the correct copy number for all of the images that you want to manipulate?  No really!  Are you really really sure?

Highlighted

Re: Using bpexpdate -recalculate


@shawntabat wrote:

In the last week, I was able to recalculate retention on our NDMP backups by using:

bpexpdate -recalculate -policy (policyname) -retention (retention level of 2 years)

This was applied to our policies and I still need to recalculate the expiration for the tapes.


That's a good first step, sure (also make sure to change the policy itself so that new images aren't written with the undesired retention level). 

Please make sure to read sdo's post too!  They makes some excellent points.

If you've recalculated by policy name and haven't had your desired result (generating scratch tapes?) then I would point you back to investigatng this from the other direction.  Start with a tape you think you want to expire, list all the backup images that are on it (note all the policies) and assess from there.  You may have more policies than you expect writing to the same tapes and if you expire all of them except one, then your tape will not expire.

Once you've cleaned up the unwanted images, just leave NBU to do it's thing.  It will recycle the tapes for you into the Scratch pool within a day or so, as sdo said.