cancel
Showing results for 
Search instead for 
Did you mean: 

Wants To Expire Backup And Reuse Media

Irfan_Ahmad
Level 4
Friends!
I am working on Veritas Netbackup 6.0 MP4 on windows environment. Just now i have found a problem regarding backup. Actually, one of my policy is taking oracle backup through RMAN. Last week, last backup channel fail due to unavailability of media with 96 error code and after while it was run manually which complete after 18 hours.

But last fail or incomplete backup has taken my 7 media cartridges and its showing it will expire after 2-weeks.

But i know that, this backup is useless/incomplete and its just taking my media resources. Now i required two things, first i want to expire this backup image plus wants to reacquire my consumed media. How to sort this issue?

Regards,

Irfan Ahmad
Mobilink-Pakistan
Specialist (Database/TL)
1 ACCEPTED SOLUTION

Accepted Solutions

J_H_Is_gone
Level 6
17 REPLIES 17

Kiran_Bandi
Level 6
Partner Accredited
Use bpexpdate, which changes expiration date of backups in image catalog and media in media catalog. The image record in the image catalog contains an expiration date. The media ID in the media catalog also contains an expiration date. The expiration date is the date and time when NetBackup removes the record for a backup or a media ID from the corresponding catalog.

Giroevolver
Level 6
Hi,

The best way to do this is to expire the backup images in the catalog if your using the GUI simply open the admin console go to the netbackup management then catalog. Then either select the media ID of the tapes you know the jobs failed on or use the policy options on the right. Make sure you select the correct dates oftherwise your failed jobs will not show in the catalog. Hit search and hopefully the failed images should show in the list. simply right click on them and hit expire. once all the images for a tape have expired the tape should go back in to your scratch pool for reuse.

This is a rough outline of what you need to do but it may depend slightly on your setup.

I hope this helps!

Ernst_Wanner
Not applicable

Hi Irfan

You can use the bpexpdate command to expire the required media (location is Netbackup Install dir/bin/admincmd)

bpexpdate -m < Media ID> -d 0 -host <host owning the media>

-d 0 sets the expiration to immediatly

Take care with this command - it removes the catalog information and the media is ready for use afterwards
You can use the -force option if you want to use it in scripts (no confirmation required)

Regards,
Ernst

 

Andy_Welburn
Level 6
on the media then, as K.B. states above & Ernst (***EDIT  bit slow there & no refresh!), use the bpexpdate command:

bpexpdate -force -d 0 -m media_id

-force   suppresses a confirmation prompt.
-d 0       sets the expiration date to now.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

This might be a good time to evaluate your media requirements and retention levels.....

Ensure you have enough media to accommodate amount of data to be backed up - use the uncompressed capacity of your tapes to do calculations. Ensure that you have enough tapes to satisfy retention periods as required by Business.

Christoph_Linde
Level 5
Employee
It is very dangerous to expire images with bpexpdate -m media_id ... You can throw away images that should be kept. There is no guaranty, that no other images are on those tapes (Multiplexing, later, earlier starttimes, etc. pp.).

Best way is to use the GUI and expire the images, not the tapes.

AND PLEASE FOLLOW THE ADVISE FROM MARIANNE

Irfan_Ahmad
Level 4
hi!
Thanks for your responses. Please look on response by Giroevolver. Infact, i want to expire my backup image neither media id because media can contain multiple copies from different clients. So, are you agree with this person please comment on it ?

Regards;

Irfan Ahmad

Kiran_Bandi
Level 6
Partner Accredited
Hi Irfan,

But in your scenario you have seven tapes, which have only failed Oracle backup (As per your post).

So, there is no other problem i can see in applying bpexpdate.

Andy_Welburn
Level 6

expiring media can be dangerous as it could expire images that you still require. That's why I said if you're 100% sure there's nothing on the media that you require.

The problem with expiring images only is that this will not necessarily free up media for use - unless some or all of those images & those images only reside on specific media.

Best bet then, if you believe there are other images on the media that you require, would be to expire individual images for the backups that you no longer require. It may be that in doing so you will free up media for use, but no guarantees!

Kiran_Bandi
Level 6
Partner Accredited
If you have media containing number of images and you want to expire a single image from that media, it is always recommended to use GUI.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Expiring images will not resolve your media problem.

Media can only be overwritten once ALL images on media have expired.

Consider the following scenario:

| IMAGE1 | IMAGE2 | IMAGE3 | IMAGE4 | IMAGE5 |IMAGE6 |

You expire IMAGE1, IMAGE3, IMAGE4

| xxxxxx | IMAGE2 | xxxxxx | xxxxxx | IMAGE5 |IMAGE6 |


The image info is deleted from the NBU image database, but the space occupied by these images cannot be overwritten.

Only when ALL images have expired can the tape be overwritten from the beginning.

Good time to motivate the purchase of more media....

If you have one blank media, you should be able to duplicate remaining, left-over images on a couple of tapes to one new tape and then expire all the original 'fragmented' tapes.

Irfan_Ahmad
Level 4

Friends!
Thanks for your responses. Infact, according to your responses there is no option to release my occupied media. Right now, i have found approx.30 (LTO2) media's in my TL which have occupied media against failed backup. 

Marianee:
Suppose if my media have 7-images, 6-images size is approx 200M and 7th image have approx.447G size. If i mark expire to 7th image then the remaining media will come back in scratch pool?

Regards;

Irfan Ahmad

 

Kiran_Bandi
Level 6
Partner Accredited
No way...

J_H_Is_gone
Level 6
http://www-secure.symantec.com/connect/blogs/understanding-how-netbackup-writes-tape

I did a write up to better understand how NB writes to tapes.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
As per JH's blog:

 - if your tape is multiplexed, your images will be interleaved.

Meaning Image7 is not necessary at the end of the media....

As long as there are valid images on the media, it will not be returned to scratch - only when all images on the tape have expired.

Use these reports/commands to monitor tape usage:

Tape List report
Tape Summary report (tick Verbose)
Images on Media

From cmd:
bpmedialist  (in admincmd)
available_media (in goodies)

Irfan_Ahmad
Level 4

Friends, all of them have done excellent job. I am really satisfied with your responses to understand the issue. Hopes you will continue.

Regards,

Irfan Ahmad
Mobilink-Pakistan
Specialist (Database/TL)

Irfan_Ahmad
Level 4

Good understanding note regarding media usage. thanks