Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Manually Expire Media

Created: 22 Dec 2013 • Updated: 24 Dec 2013 | 3 comments
This issue has been solved. See solution.

Hi All,

Because of wrong retention period to one policy, we had low space issue.

Now I want to manually expire the media.

I know using the commands  /usr/openv/netbackup/bin/goodies/available_media     and  bpexpdate -m (media id) -d 0

My question is ,how to find and list  the all  medias which are  belongs to (for example)  billing.full policy.

Thanks in advance.

 

Operating Systems:
Discussion Filed Under:

Comments 3 CommentsJump to latest comment

revaroo's picture

I'm not sure if that is possible. It's certainly not a good idea to expire by media as you may have valid images from a different policy on those tapes.

Just checking the man page there could be an answer:

 

bpexpdate -recalculate [-backupid backup_id] [-copy number] [-d date | 0 | infinity] [-client name] [-policy name] [-ret retention_level] [-sched type] [-M master_server,...]

 

watsons's picture

bpimagelist -media -L -policy billing.full -hoursago 100

This will give you a list of media used by this policy billing.full for the past 100 hours, adjust the hours if you need to.

If you need to filter down to schedule, add -rl <retention_level>  .

turguns@gmail.com's picture

Problem solved . I expired by client..(Because the images from the following client was not important).This is the procedure...
1.get backup id.
bpimagelist -L -d 12/1/2013 -e 12/23/2013 -client cssdb | grep -i "backup id"

cd /expire

2.copy backup_id to text_file

vi l.txt (here copy/Paste all media_Id)
cssdb_1387728140
cssdb_1387728113
cssdb_1387728098
cssdb_1387728097
cssdb_1387728065
cssdb_1387728020
cssdb_1387728019
cssdb_1387728002
:
:

(save and exit)

3.
run the script

 ./imagedel.sh

[root@nbumedia /]# more /expire/imagedel.sh
#!/bin/sh
list=/expire/l.txt  
for i in `cat $list`
do
echo $i
/usr/openv/netbackup/bin/admincmd/bpexpdate -backupid $i -d 0 -force
done
[root@nbumedia /]#

4. Run clean
bpimage -cleanup -allclient

5.bpexpdate -deassignempty -force

 

SOLUTION