cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with expiry date on tapes and backup images.

hmazeh
Level 3
Partner
Dears,

Problem 1:
When we first got the backup solution, whenever a tape is last mounted, the retention period of the data is added and then I got an expiry date for the tape.
I tried to solve this by bpexpdate -m media_id -d infinity, now tapes could be used for writing again. But the new problem is that the backup images on the tapes is infinity.
So NBU finds the tapes and knows that the tapes are ready for writing, but all of the backup images on these tapes are not expired yet, so it doesn't write and I get a 96 exit status.

Problem 2:
I have some backup images I wanted to expire because I'm changing the retention period from 1 month to 1 week. So at first I changes the policy retention period and run the command below:
bpexpdate -recalculate -policy policy_name -ret 0
After this I have no logs for any of these backup images, and NBU is not re-writing on their tapes anymore.

Please advice and thanks in advance.
1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
Don't get confused between the expiry of images on tapes and the expiry of tapes.

Image Expiry: Once a tape is full, it will not be able to be re-used until ALL the images on it have expired based on the retention period of the backups & when the backups were taken (NetBackup ONLY appends to a tape, it will NOT re-use areas that were utilised by expired images). Once this has transpired then the tape will either remain in it's volume pool as AVAILABLE (for subsequent backups) or be moved to the scratch pool from where it can be called for subsequent backups & ASSIGNED to the relevant volume pool.

Tape expiry: is another matter. This is effectively a "sell-by" date that you can assign to a tape after which it will not be used for backups. Essentially, tapes have a limited shelf life & it's up to you to decide after which date you will no longer trust that tapes ability to successfully store backup images.

View solution in original post

10 REPLIES 10

FrSchind
Level 5
Partner
OK, you have misunderstood something about the expiration thing in netbackup. The command you used in problem 1 changed the expiration of the tapes and all the images of that tape to infinity (infinity is a point in the far future, like 2038). So, since you want to keep this data forever, netbackup will not overwrite the data. If you really want to overwrite these tapes, you can run the same command using "-d 0" instead of "-d infinity" - the media will be available for new backups.

Problem 2 has to be researched further. Is the policy using an own volume pool? If not, there will be data from other policies on these tapes and they will be retained until this data expires. If the policy has its own volume pool, there might be newer images at the end of the tape, which prevent netbackup from expiring the full tape. You can check the contents of the tape with the command bpimmedia.

hmazeh
Level 3
Partner
Thanks Frerk,

Problem 1:
If I change the expiry date with -d 0, Then after writing to the tape what will happen? will the tape expire? am I able to write to it after the retention period of the latest backup image? As I faced, the tape expires after the retention period fo the latest backup image on this tape.

Problem 2:
This policy has it's own volume group. All of the images are written and expired since a long time. These images are related to the tapes I changed their tapes expiry date to -d inifinty then I tried to change their retention period from infinity by bpexpdate -recalculate -policy policy_name -ret 0

What is normally done as a best pracitice? do you leave the tapes as they are?

Regards.


Marianne
Level 6
Partner    VIP    Accredited Certified
Problem 1:
If you use -d 0, ALL images on the tape will be expired and the tape will be returned to scratch, The tape can now be overwritten.

Problem 2:
Best practice: Leave tapes as they are. Retention Periods is a business requirement and should be implemented as a standard when the backup solution is rolled out. If you don't have enough tapes to satisfy these business requirements, buy more tapes, don't start expiring tapes/images. Your system owners WILL ask for a restore the day after you've expired their backups!

To monitor tape usage, use the media reports in NetBackup:
Media Written
Media Summary (Verbose)
Media Lists

hmazeh
Level 3
Partner
Dear Marianne,

Thanks for the information.
I have more than enough tapes, but my problems is:
Lets say I  have 4 tapes, and on each tape I can write 3 backup images, on a daily basis with a 7 days retention period.
So if I started first backup on beginning of month, The first tape is filled on 3rd of month, and on 12th all the tapes will be full.
NBU will go to the first tape back again on 13th, here it will face a problem, because the tape is expired on 3rd + 7 days=10th of month, So I cannot write to the media anymore as it's expired.
If I change the expiry date to infinity: bpexpdate -m -d infinity, The expiry date of the backup images on tape is changed also and I cannot write to it again.
This is where I'm stuck, I appreciate your advices.

Thanks in advance.

nairdheeraj
Level 4
I am not sure if I have fully understood your concern.

Problem 1:

You are saying that the tape 1 is used for three consecutive days and so ideally the tape would expire on 10th if it was initially used on the 1st of the month.

This is not completly correct as on the 8th that is after 7 days retention the tape would have free space to accomadate one image as the image that was written on 1st can be overwritten and on 9th the second image can be over written etc. Secondly the retention is fixed for the images on the tapes rather than the whole tape itself. Ideally the tape expiry is equal to the expiry date of the image that has the highest retention within that particular tape.

Problem 2:

For changing the retention always use the backup id. i.e

bpexpdate -backupid -d <new_date>

This is the best approach as there could be a continuation of a particular image on another tape. By using the above command the image DB will get updated with the new expiry date.

If you start changing the retention per tape there are chances you can miss out to extend the expiry for certain image that are extended to other tapes.


Please let me know if your concern has been addressed.

hmazeh
Level 3
Partner
Thanks for your information.

You are right regarding the expiry date. The problem we are facing is that on the 12th day all my tapes are full. So I will be back to tape 1 on 13th day.
On 13th day, tape1 is expired, because as you said earlier, the tape expiry is the date of the latest write plus the retention period, which is the 3rd day plus 7 days, so it will expire on 10th day.

I'm not understanding this issue, because if the image is not expired, I cannot overwrite it, but when it expires the tape expires too and I cannot write again because it's an expired tape.

I need your advice. what happens in such scenario? what do you normally do? do you have to deal with expiry dates for tapes and backup images?


Regards.

nairdheeraj
Level 4
On the 11th are you able to see images from that particular client on the Catalog.

Just a note. Even if an image expires from Catalog does not mean that it will expire from the tape. Once the images has expired from the catalog then Netbackup will be in a position to over write the image on the tape and hence loosing the expired data for good.

Can you please explain as I didnt get this statement

"I'm not understanding this issue, because if the image is not expired, I cannot overwrite it, but when it expires the tape expires too and I cannot write again because it's an expired tape."

Does this mean that even after the 10 days the tape is not showing as expired?

There is no need to manage the expiry date of tapes and images as that is done by Netbackup as long as it is set correctly in the policy.

As a suggestion try this.

Use one tape for three days to backup data with 7 days retention. Persume you are doing this on the 1st. Eject the tape after the third day.

On 11th re insert the above tape and run the policy. It will be able to overwrite the images on the tape as they have already expired from the catalog.



Andy_Welburn
Level 6
Don't get confused between the expiry of images on tapes and the expiry of tapes.

Image Expiry: Once a tape is full, it will not be able to be re-used until ALL the images on it have expired based on the retention period of the backups & when the backups were taken (NetBackup ONLY appends to a tape, it will NOT re-use areas that were utilised by expired images). Once this has transpired then the tape will either remain in it's volume pool as AVAILABLE (for subsequent backups) or be moved to the scratch pool from where it can be called for subsequent backups & ASSIGNED to the relevant volume pool.

Tape expiry: is another matter. This is effectively a "sell-by" date that you can assign to a tape after which it will not be used for backups. Essentially, tapes have a limited shelf life & it's up to you to decide after which date you will no longer trust that tapes ability to successfully store backup images.

J_H_Is_gone
Level 6
Pleas see my blog  it may help you understand the diffence between an image expiration and a tape expiration

www-secure.symantec.com/connect/blogs/understanding-how-nerbackup-writes-tape

after you understand this - I would go and change the expiration of your "tapes" to none and just work on the images on the tapes.

hmazeh
Level 3
Partner
Thanks, great explanation.