cancel
Showing results for 
Search instead for 
Did you mean: 

Change expiration date to all backups image in catalog to infinite

Hi All,

I have a requirement to change expiration date for all backup image in catalog to infinite. I aware by backup ID, Media ID or client name we can do the changes but i want to have a single command that change exp date to infinite of all backup images in the catalog.

Before I used bpexpdate -recalculate -client clientname -d infinity -force, here i want to know this command could have changed the expiration date to infinite for all backup images of the client specified or not ?.

Most of images we have in disk storage i.e on DD. If there a command to change all images to infinite in DD by specifiying the storage unit name or diskpool ..etc  also would be helpful.

Also want to know the different between image and media expiration.

 

 

Tags (2)
1 Solution

Accepted Solutions
Accepted Solution!

Re: Change expiration date to all backups image in catalog to infinite

Hello

I am not aware of any command to change expiration for backup images kept in certain storage unit...

What I would do is:

  • list all backups and take out only backup ID part of it (in my NBU version it is column 10th)
  • than run against each image a bpexpdate command ie:

bpimagelist -d 1/1/1970 -idonly |awk '{print $10}'  |xargs -n1 bpexpdate -force -d infinity -backupid

and that should be done... If you have thousands of backup images I would do some logging etc... and make sure that your session will not die in mean time... on linux i would do in in screen....

View solution in original post

10 Replies
Accepted Solution!

Re: Change expiration date to all backups image in catalog to infinite

Hello

I am not aware of any command to change expiration for backup images kept in certain storage unit...

What I would do is:

  • list all backups and take out only backup ID part of it (in my NBU version it is column 10th)
  • than run against each image a bpexpdate command ie:

bpimagelist -d 1/1/1970 -idonly |awk '{print $10}'  |xargs -n1 bpexpdate -force -d infinity -backupid

and that should be done... If you have thousands of backup images I would do some logging etc... and make sure that your session will not die in mean time... on linux i would do in in screen....

View solution in original post

Re: Change expiration date to all backups image in catalog to infinite

You can also create a touch file in the NetBackup bin directory called NOexpire. This will prevent NetBackup from running the expirey process. It does not change anything in  the catalog, so if the file is later removed, on the next cleanup run, everything that should have expired will be - so this is not a complete solution. Have a read of the article which explains its use and provide warnings:

https://www.veritas.com/content/support/en_US/article.100002418

 

Re: Change expiration date to all backups image in catalog to infinite

@AnandhaKannan_D the option you tried should work - bpexpdate -d infinity [-client name] [-force] 

To validate that your command worked, use bpimagelist -client -U and check the expiration date, it should be set to infinity. If you have multiple copies, use bpimagelist -client -L and see each copy is set to infinity (fun part, I have never set retention to infinity ever)

To change the retention for all the clients you may have to run for loop or small script. Validate using the small script as well. 

Re: Change expiration date to all backups image in catalog to infinite

Additionally - setting all backup images to infinite retention is (in my opinion) a bad idea. If the requirement is to prevent backups from expiring for some reason, such as a legal case, then I would suggest you look at the nbholdutil command. This would have the desired outcome of preventing backups from expiring, but does not change the retention setting for backups. 

This way, once the requirement to keep all backups has leifted, the system will revert to how it should behave. 

NetBackup is a backup and recovery tool - if the infinite retention change is to make it an archive tool, then you should get management to invest in a proper archiving tool (such as Enterprise Vault). 

Re: Change expiration date to all backups image in catalog to infinite

@AnandhaKannan_D 

You should not set backups on Data Domain to infinity, backups will never expire and by time fill your data domain. A sweet spot for deduplication devices is retention from 1 -3 months.

What you should do, is to duplicate backup from data domain to tape and set the tape copy to infinity. Backup on the data domain will then expire according to normal retension, but the tape copy will remain.

https://www.veritas.com/support/en_US/doc/123533878-127136857-0/v123537351-127136857

You will have to "command line this". I would use "nbdevquery -listdv -stype DataDomain" to get the images currently stored in the Data Domain, and then bpduplicate command to create a secondary copy with infinity retension.

Be aware images clean kick off every 12 hours. Thus a "baseline" list of images will change after every 12 hours, so maybe combine the process with the "Noexpire" touchfile

Re: Change expiration date to all backups image in catalog to infinite

@quebek  Thanks for Unix command. Do u have the same for Windows.

Re: Change expiration date to all backups image in catalog to infinite

@davidmoline  You are right it is not complete solution i hope even in the article i can see it is not fomally supported.The NOexpire touch file (NOexpire) prevents the automatic expiration of backup images within the image data base and is therefore not formally supported

Re: Change expiration date to all backups image in catalog to infinite

@Tape_Archived  Thanks. I have changed expiration date to infinity for all clients, to verify the same any idea to find the image which is not set to infinity by script

Re: Change expiration date to all backups image in catalog to infinite

@Nicolai Thanks. We aware of the impact however its our business requirement.

Re: Change expiration date to all backups image in catalog to infinite

There are several way to find the backup images and their retention level.

Use you console under - Netbackup Managment => Reports => Images on Media

Using command - Find all retention levels used in your environment using bpretlevel and run the bpimagelist using option -rl [retention_level] and other command combination that suits your need.