Forum Discussion

ilap's avatar
ilap
Level 3
9 years ago

Recalculate retention on local images and not on tapes.

Hi,

We have an SLP which has a retention for a year and backup up to PureDisk.

This images are duplicated to tapes /w 7-year retention.

I would like to change the retention from 1-year images to 9-month and do not change the retention of the vaulted tapes.

Is there any easy way to do that?

I was thinking to set the SLP's retention to 9 months and do the bpexpdate -recalculate without any parameter.

I think it will only recalculate the changed retention of that SLP, but I am not sure, and also I am not sure either that what would happen /w the vaulted tape images.

Thx in advance for your help.

 

 

  • NetBackup works with the expiration dates on copies.  When it comes to managing the lifespan (i.e. expiry time) of any copy of any backup image, NetBackup does not work with the retention levels on the image header or the image copies - these are just markers to show/record the retention level number that was applied at some time in the past, i.e. when the retention was actually applied to an image or copy.  After this the retention level numbers are never used again, unless you recalculate.

    I believe the first image shows retlevel 9 on the image header, simply because it has not been 'updated' by anything other than an SLP.  i.e. SLPs always mark image headers and image copies as retention level 9 until the SLP processing is complete, and only then are retention levels applied to copies.

    For the second image, you have manually set the ret-level to 7, and so the image header has also had it recorded that one of the copies has a ret-level 7.

    What you are checking are effectively cosmetic fields and of no consequence to NetBackup's own algorithms which manage actual expiry of copies and and ultimately images (when a final copy expires).

10 Replies

  • You will need to list images on disk, confirm that they are copy number 1, then loop through the list of image-id's to recalculate retention with new level and add '-copy 1' to ensure copy on tape is not affected.

  • ilap - I'll send you a script which may help you.

  • Thx for that, but where did you send it? As I have not received any.

    Anyway, I did the followng for the test.

    bpimmedia -l -t FULL -sl monthly_full | grep ^IMAGE > /tmp/LIST # Collect all full as only they're SLP-ed to tapes. other's are just on dedup devices.

    bpimedia -L -t FULL says that they have retetion 9 (infinity, 3rd value), but why? SLP have 1 year which duplicated to 7yrs tape?

    BACKUPID POLICY  9   206478  N  N  R  2   0     0            Sat Dec 17 20:00:57 2016
     1 IDX    31533 RMed hcart3  4         4448195   brinbap01- 3                                   0    IB2083
     1   1 103159104 RMed hcart3  3         2836332   brinbap01- 3   N   Fri Dec 16 20:00:57 2022 10 0    IB2083
     2 IDX    31532 Disk -       -         -         brinbap01- -                                   0    @aaaac
     2   1 51200000 Disk -       -         -         brinbap01- -   N   Sat Dec 17 20:00:57 2016 8  0    @aaaac
     2   2 51200000 Disk -       -         -         brinbap01- -                                   0    @aaaac
     2   3   759104 Disk -       -         -         brinbap01- -                                   0    @aaaac

     

    bpexpdate -recalculate -copy 2 -backupid <BACKUPID> -ret 7 # has changed the retention from  9 to 7, but why?

    I am confused how it will affect the tapes retention. It has not changed but, I am not sure what will happen with that 7-yr retention. 

    But, this type of administration tasks seem to me very overcomplicated to make just a simple change. 

     

    Cheers,

    Pal

     

  • Check the image itself:

    bpimagelist -L -backupid client_ctime | egrep "^Backup|^Copy|Time|Retention|Copies|Media|Frag"

    .

    FYI - when you use "-ret 7" on a bpexpdate -recalculate, it means "apply the time period specified by retention level 7 TO the original backup date".  It does NOT mean apply 7 years.

  • I IM'd you via the forum.  Nothing in your "inbox" ?

  • Thx I got the script.

    Sorry, I ws not clear I meant form 1 year to 9 months eg. -ret 7 

    The issues is why the infinity (ret 9) is changed to 7 and if changed what is the outcome for the 7 years retention?

     

    BACKUPID POLICY  9   206478  N  N  R  2   0     0            Sat Dec 17 20:00:57 2016 # It has retention 9

     1   1 103159104 RMed hcart3  3         2836332   brinbap01- 3   N   Fri Dec 16 20:00:57 2022 10 0    # copy 1 has 7 years

     2   1 51200000 Disk -       -         -         brinbap01- -   N   Sat Dec 17 20:00:57 2016 8  0    # copy 2 has 1 year

    -ret 7 do the following 

    BACKUPID POLICY  7   206478  N  N  R  2   0     0            Sat Dec 17 20:00:57 2016 # It has changed to 7 which is NOT expected.

     1   1 103159104 RMed hcart3  3         2836332   brinbap01- 3   N   Fri Dec 16 20:00:57 2022 10 0    # copy 1 still has7 years

     2   1 51200000 Disk -       -         -         brinbap01- -   N   Sat Sep 17 20:00:57 2016 8  0    # copy 2 has 9 months year, which is the expected value

  • NetBackup works with the expiration dates on copies.  When it comes to managing the lifespan (i.e. expiry time) of any copy of any backup image, NetBackup does not work with the retention levels on the image header or the image copies - these are just markers to show/record the retention level number that was applied at some time in the past, i.e. when the retention was actually applied to an image or copy.  After this the retention level numbers are never used again, unless you recalculate.

    I believe the first image shows retlevel 9 on the image header, simply because it has not been 'updated' by anything other than an SLP.  i.e. SLPs always mark image headers and image copies as retention level 9 until the SLP processing is complete, and only then are retention levels applied to copies.

    For the second image, you have manually set the ret-level to 7, and so the image header has also had it recorded that one of the copies has a ret-level 7.

    What you are checking are effectively cosmetic fields and of no consequence to NetBackup's own algorithms which manage actual expiry of copies and and ultimately images (when a final copy expires).