Forum Discussion

Ramkumar_S's avatar
Ramkumar_S
Level 4
10 years ago

Command for getting Backupid

What is the command for getting the image id for particular client backup happened on two months before and what is the command for extending the image expiration date for particular image ID.

  • TO list the backup image ID

    bpimagelist -client client_name -hoursago <number of hours > -idonly

    http://www.symantec.com/business/support/index?page=content&id=HOWTO90315

    to change the expire date

    bpexpdate -recalculate -backupid backup_id -d date

    http://www.symantec.com/business/support/index?page=content&id=HOWTO43656

3 Replies

  • TO list the backup image ID

    bpimagelist -client client_name -hoursago <number of hours > -idonly

    http://www.symantec.com/business/support/index?page=content&id=HOWTO90315

    to change the expire date

    bpexpdate -recalculate -backupid backup_id -d date

    http://www.symantec.com/business/support/index?page=content&id=HOWTO43656

  • the command to get the image id is the bpimagelist. run the command

    bpimagelist -d <start_date> -e <end_date> -client <clientname>

    and pipe it to: find "IMAGE" for windows or grep IMAGE for linux, to get the IMAGE line. The sixth column is the backupid.

    then run the command :

    bpexpdate -backupid <backuid> -d <date>   to change the expiration date ot

    bpexpdate: -recalculate -backupid <backup id> -ret <retention level> to change the expiration by changing the retention level.

     

    if you are using unix/linux you car run the following script. 
    change the start_date, clientname and date according to your needs and run it.
    the output will be the commands you have to run in order to change the retention. check them and copy paste them to a prompt.

    If you are OK you can delete the echo and the commands will run automatically.

    bpimagelist -d <start_date> -e <end_date> -client <clientname>|grep IMAGE |awk '{print $6}>/tmp/backupid.txt
    for backupid in  `cat /tmp/backupid.txt`
    do
    echo bpexpdate -backupid ${backupid} -d <date> -force
    done

     

    Be careful because the command bpexpdate -backupid <backupid> -d 0 will expire your backups immediately.

     

     

  • Hopefully the backups have not yet expired?

    If not, this is how I would do it:

    bpimagelist -idonly -client <client-name> -d <start-date> -e <end-date>
    (format for start and enddate: mm/dd/yyyy)

     

    To extend expiration date:

    bpexpdate -backupid <backup-id> -d <mm/dd/yyyy>
    (where the date specified with -d is new expiration date)