NetBackup How to expire backup images & move media to scratch pool
I have gone through a scenario when some of backup images were no longer required and we decided to discard those images and reuse the media. This is how we achive it.
- Verify if there are valid images on the tape.
- Expire images.
- Verify if the tape is assigned or not.
- De-assign media
- Change volume pool
Verify if there are valid images on the tape.
The bpmedialist command can then be used to determine if there are valid images still on the tape. If there are valid images still on the tape, then the tape cannot be moved to another volume pool until all valid images have expired.
<Install_Path>\Program Files\Veritas\netbackup\bin\admincmd\bpmedialist -m <media_id>
Expire Images
If a media has valid images, but that images are no longer desired, the following command may be run:
bpexpdate -m <media_id> -d 0 -force
Verify if the tape is assigned or not
The vmquery command can be used to determine if the tape is assigned or not. Check the "assigned:" entry to see if an assigned time has been set. If an assigned time has been set, the tape cannot be moved to another volume pool until all valid images have expired.
<Install_Path>\program files\veritas\volmgr\bin\vmquery –m <Media_Id>
De-assign media
In case where the tape is listed with an assigned date, but where NO valid images exist on the tape, the following command can be run:
C:\Program Files\Veritas\netbackup\bin\admincmd\bpexpdate -deassignempty -m <media_id>
Change volume pool
Now backup images are expired, media de-assigned, now we can change volume pool
vmchange –p <destination_pool_number> -m <media_id>
OST Image delete
/usr/openv/netbackup/bin/admincmd# ./bpimmedia
IMAGE H13-215 10 H13-215_1506391579 LSU_Backup_001 0 all 0 1 1083 1507601179 0 0 0 0
FRAG 1 1 2984352 0 0 0 0 @aaaab H13-215 262144 0 0 -1 0 1;FalconStor;H13-97;LSU_Pool_Sol_001;LSU_sol_lsu_001;0 1507601179 0 1 6 *NULL* 0
IMAGE H13-215 10 H13-215_1506391563 LSU_Backup_002 0 all 0 1 185 1507601163 0 0 0 0
FRAG 1 1 5065728 0 0 0 0 @aaaab H13-215 262144 0 0 -1 0 1;FalconStor;H13-97;LSU_Pool_Sol_001;LSU_sol_lsu_001;0 1507601163 0 1 6 *NULL* 0
root@H13-215:/usr/openv/netbackup/bin/admincmd# ./bpexpdate -backupid H13-215_1506391579 -d 0
Are you SURE you want to delete H13-215_1506391579 y/n (n)? y
root@H13-215:/usr/openv/netbackup/bin/admincmd# ./bpexpdate -backupid H13-215_1506391563 -d 0
Are you SURE you want to delete H13-215_1506391563 y/n (n)? y