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

1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

Run it in a script -

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
Highlighted

-backupid Changes the

-backupid

Changes the expiration of a single backup

 

per the Command Reference manual

Highlighted
Accepted Solution!

Run it in a script -

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

Highlighted

Perhaps a powershell script....

.... can be used for Windows.

Thanks,

Sven

Highlighted

One way

Highlighted

what exactly do you want to do?

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 8.1.2 on Solaris 11, writing to DataDomain 9800
duplicating via SLP to LTO5 in SL8500 via ACSLS
Highlighted

Re: Run it in a script -

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