cancel
Showing results for 
Search instead for 
Did you mean: 

Retention

sksujeet
Level 6
Partner Accredited Certified

I duplicated (bpduplicate) thousands of images and imported to my new NBU master server. After running the 1st and 2nd phase of import I realized that the retention for all the images it shows is infinity.

The problem is on the new NBU master server i didn't set the same retention level and it caused the images to become infinity.

I just set the retention level on the new master server and can do the import again to get this sorted but want to know if there is any other way I can fix it. Would appreciate your valuable feedback.

 

 

 

4 REPLIES 4

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

Chaninging the Retenctions manually would be the better and quiker way... if you have the details about the retenctions what suppose to be.. or if you can get those details from old master server..

get the retenctions of each image and use bpexpdate command to change the retenctions to desired one..

you can put this one in script to get you job easy...

if you can not find the proper retenctions for the images is you can get aggrement to set one retenctions for all images in new master server and defined it..

if above 2 are not options. then you need to expire all images in new master server and perfrom the import again.

sksujeet
Level 6
Partner Accredited Certified

Hmm, ya i am kind of afraid to do anything manually. I expired and tried to import couple of impages to test and realized the other problem.

The new master server is calculating the retention from today. So the image which was expiring on 2019 is now showing to be expired on 2027. Just breif steps what i did:

1> bpduplicate the images to a disk location to other master server, (no change in retention)

2> Ran the phase 1 and phase 2 import on new master server.

3> In the Disk report - images on disk it shows the expiration date 2027

4> Old master server Disk report- images on disk it shows the expiration date 2019. I was hoping to reflect the same on the new master server after doing the import but that doesn't seem to work.

sksujeet
Level 6
Partner Accredited Certified

I was reading this and looks like that is by design, is this true. So the only option I have is to do it via script. Is there any other option where I just import and get the same expiration date.

Phase 2: In second step NetBackup recreate the files information in the images database. This process take some time to complete depending on the number and size of images being imported.

Once the Phase 2 import is complete, the image has the same retention level as the original backup and a new expiration date calculated as the import date plus the retention period defined currently in Host Properties for the original backup's retention level.  At this point, the image is restorable like the original backup.

sksujeet
Level 6
Partner Accredited Certified

I figured it out and the good part is you don't need any other information from old server. This would be helpful if you want to import images and don't have the old server.

The image already have the backup information date and the retention level for that image.

You have to just make sure that the same retention level exist on the new master server. You can then use simple script below and the expiry date would be exactly same the way it was on old server.

I just did this and it worked fine.

Note:- Make sure the system time and date on both the old NBU and new NBU should be same or you have to adjust the script. This script is for windows.

$images = get-content .\imagelist.txt

/#you can get the images by going to catalog on new server once import is done

foreach ($image in $images) {
    write-host "working on $image"

    $bpimagelist_output = bpimagelist -backupid $image -l
                
    foreach ($bpimage in $bpimagelist_output) {
        $wholeline = $bpimage.ToString().split(" ",[StringSplitOptions]'RemoveEmptyEntries')
         $retlvl = $wholeline[12]
                
        if ($imageorfrag -match "IMAGE") {
                   
            bpexpdate -recalculate -backupid $image -ret $retlvl -force
            }

         }

 }