Forum Discussion

wellssh's avatar
wellssh
Level 4
13 years ago
Solved

BPEXPDATE command, any way to change retention of multiple BackupID's at once?

We are looking to use the BPEXPDATE comment to change the retention period for multiple Backup IDs simultaneously.  Does anyone know if there's a way to do this?

I am aware that this can be done on an individual basis, but we'd like to do this for many Backup IDs all at once.

Thanks,

Sven

  • Run it in a script - presumeing here they ill all have the same date

    Put backupids in file1

    cat file1 |while read LINE

    do

    bpexpdate -d <date > -backupid $LIINE -force

    done

    This is unix/ linux - not sure how to do it on windows, but someone should be able to help, or just google it ...

    Martin

  • -backupid

    Changes the expiration of a single backup

     

    per the Command Reference manual

  • Run it in a script - presumeing here they ill all have the same date

    Put backupids in file1

    cat file1 |while read LINE

    do

    bpexpdate -d <date > -backupid $LIINE -force

    done

    This is unix/ linux - not sure how to do it on windows, but someone should be able to help, or just google it ...

    Martin

    • shubh120's avatar
      shubh120
      Level 4

      There is correction in command bpexpdate -d <date > -backupid $LINE -force instead of LIINE

  • Be aware, that if you extend the retention of ONE backup image on a tape, you extend THE WHOLE tape.

    Plan carefully, measure twice and cut once!

    There are options to search for images by client or policy or retention - as long as you can group by these it is pretty simple.

    Just checking the bpexpdate man page, if you can generate a list of media a simple for/next loop will do the trick...

     

    NAME
         bpexpdate - change expiration date of backups in image catalog and media in media catalog

    SYNOPSIS
         <admin_dir_path>bpexpdate -m media_id -d date | 0 | infinity [-host name] [-force] [-nodelete] [-notimmediate] [-M master_server,...]

         <admin_dir_path>bpexpdate -deassignempty [-m media_id] [-force] [-M master_server,...]

         <admin_dir_path>bpexpdate -backupid backup_id -d date | 0 | infinity [-client name] [-copy number] [-force] [-nodelete] [-notimmediate] [-M master_server,...]

         <admin_dir_path>bpexpdate -recalculate [-backupid backup_id] [-copy number] [-d date | 0 | infinity] [-client name] [-policy name] [-ret retention_level] [-sched type] [-M master_server,...]

         <admin_dir_path>bpexpdate -stype server_type [-dp disk_pool_name [-dv disk_volume]] [-nodelete]
         [-notimmediate] [-M master_server,...]