12-17-2020 03:19 AM
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.
Solved! Go to Solution.
12-17-2020 03:25 AM - edited 12-17-2020 03:25 AM
Hello
I am not aware of any command to change expiration for backup images kept in certain storage unit...
What I would do is:
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....
12-17-2020 03:25 AM - edited 12-17-2020 03:25 AM
Hello
I am not aware of any command to change expiration for backup images kept in certain storage unit...
What I would do is:
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....
12-17-2020 01:42 PM
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
12-17-2020 01:43 PM
@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.
12-17-2020 01:53 PM
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).
12-18-2020 02:01 AM - edited 12-18-2020 03:14 AM
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
12-19-2020 08:59 AM
@quebek Thanks for Unix command. Do u have the same for Windows.
12-19-2020 09:02 AM
@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
12-19-2020 09:06 AM
@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
12-19-2020 09:08 AM
@Nicolai Thanks. We aware of the impact however its our business requirement.
12-21-2020 08:04 AM
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.