Monday, October 21, 2013

Netbackup - How to change the expiration date?

                                Netbackup - How to change the expiration date?

-------------------------------------------------------------------------------------------------------
People say that when you run this command (the command below) you get all the required information with regards to the media which was used for the backup.

/usr/openv/netbackup/bin/admincmd/bpimagelist -client [client] -d [date of the backup] -e [1 day after the backup]

BUT UNFORTUNATELY --

It doesn’t give the backup id of which the expiration date needs to be changed.

So this is what i tried at my end -

I ran

# ./bpimagelist -client unixfoo90 -media -d 04/23/2010 -e 04/24/2010
A00461 ajbkup 1272114266 17 81416886 10
A00326 ajbkup 1272114266 43 69301582 10
A51671 ajbkup 1272114266 14 19195648 10
A50155 ajbkup 1272114266 41 56309070 10
A51064 ajbkup 1272080168 5 75213750 10

This gave me the time in ctime.

I converted the ctime into the normal time.

# ./bpdbm -ctime 1272080168
1272080168 = Fri Apr 23 22:36:08 2010

I noted down the media ID for the backup which happened on - Apr 23 22:36:08 2010 --which matched with the request.

With this I ran..

# ./bpimmedia -L -mediaid A51064 -client unixfoo90

Backup-ID            Policy     Type  RL  Files   C  E  T  PC  Expires
Copy Frag    KB Type Density FNum      Off       Host       DWO MPX Expires          RL MediaID
------------------------------------------------------------------------------------------------

unixfoo90_1272247531  sapdistdb  INCR  10   16      N  N  R  1   21:05 06/13/2010
 1   1        0 RMed hcart3  32        2173295   ajbkup   901 Y   21:05 06/13/2010 10 A00238
 1   2      224 RMed hcart3  33        2173305   ajbkup   901                         A00238
 2   1        0 RMed hcart3  161       3473274   ajbkup   124 Y   21:05 06/13/2010 10 A51064
 2   2      224 RMed hcart3  162       3473284   ajbkup   124                         A51064

unixfoo90_1272080168  sapdistdb  INCR  10   26      N  N  R  1   22:36 06/11/2010
 1   1        0 RMed hcart3  156       3798984   ajbkup   107 Y   22:36 06/11/2010 10 A00461
 1   2     1024 RMed hcart3  157       3798990   ajbkup   107                         A00461
 1   3  1921024 RMed hcart3  158       3799006   ajbkup   107                         A00461
 1   4 73037824 RMed hcart3  159       813953   ajbkup   107                         A00461
 1   5   253878 RMed hcart3  160       4099259   ajbkup   107                         A00461
 2   1        0 RMed hcart3  134       1427550   ajbkup   124 Y   22:36 06/11/2010 10 A51064
 2   2     1024 RMed hcart3  135       1427556   ajbkup   124                         A51064
 2   3  1921024 RMed hcart3  136       1427572   ajbkup   124                         A51064
 2   4 73037824 RMed hcart3  137       1442519   ajbkup   124                         A51064
 2   5   253878 RMed hcart3  138       1727825   ajbkup   124                         A51064

unixfoo90_1271992736  sapdistdb  INCR  10   18      N  N  R  1   22:18 06/10/2010
 1   1      768 RMed hcart3  117       3021213   ajbkup   111 Y   22:18 06/10/2010 10 A00461
 1   2    69321 RMed hcart3  118       3021242   ajbkup   111                         A00461
 2   1      768 RMed hcart3  96        671044    ajbkup   124 Y   22:18 06/10/2010 10 A51064
 2   2    69321 RMed hcart3  97        671073    ajbkup   124                         A51064

Finally I got the BACKUP ID -- unixfoo90_1272080168

Later I found that I could have easily got this with the below mentioned command –

# ./bpimagelist -L -client unixfoo90 -d 04/23/2010 |grep "Backup ID"
Backup ID:         unixfoo90_1272718818
Backup ID:         unixfoo90_1272684933
Backup ID:         unixfoo90_1272680883
Backup ID:         unixfoo90_1272596918
Backup ID:         unixfoo90_1272519172
Backup ID:         unixfoo90_1272425403
Backup ID:         unixfoo90_1272339748
Backup ID:         unixfoo90_1272247531
Backup ID:         unixfoo90_1272114266
Backup ID:         unixfoo90_1272080168

Later,

# ./bpexpdate -recalculate -backupid unixfoo90_1272080168 -d 10/23/2010 12:00:00

VERIFICATION --

# ./bpimagelist -client unixfoo90 -d 04/23/2010 -e 04/24/2010 -U
Backed Up         Expires       Files       KB  C  Sched Type   Policy
----------------  ---------- -------- --------  -  ------------ ------------
04/24/2010 08:04  06/12/2010      156 75504718  N  Full Backup  bkupatp

04/23/2010 22:36  10/23/2010       26 75213750  N  Differential bkupatp

No comments:

Post a Comment