cancel
Showing results for 
Search instead for 
Did you mean: 

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

wellssh
Level 4

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

1 ACCEPTED SOLUTION

Accepted Solutions

mph999
Level 6
Employee Accredited

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

View solution in original post

6 REPLIES 6

Will_Restore
Level 6

-backupid

Changes the expiration of a single backup

 

per the Command Reference manual

mph999
Level 6
Employee Accredited

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

wellssh
Level 4

.... can be used for Windows.

Thanks,

Sven

mph999
Level 6
Employee Accredited

Genericus
Moderator
Moderator
   VIP   

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,...]

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

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