Forum Discussion

JohnnyBgood's avatar
12 years ago
Solved

bpexpdate script

Master Server is Solaris NBU 7.1.03

Media Server is Red Hat Linux

Data Domain DD690

I have a script that I am using but I have to answer yes to "Are you SURE you want to delete clientname y/n (n)? all the time.

 

Heres what I've done:

>./bpimagelist -idonly -d 01/01/2009 -e 12/31/2009 | cut -d ' ' -f10 > 2009imagelist.txt

>vi delimages.sh

#!/bin/sh

for i in `cat $1`

do

echo $i

/usr/openv/netbackup/bin/admincmd/bpexpdate -backupid $i -d 0

echo 'y'

done

 

>./bpimagelist.sh 2009imagelist.txt

How do I amend my script so that I don't have to answer yes manually as it goes through my 2009imagelist.txt

P.S. I'm trying to free up some much needed disk space on my Data Domain because I'm hitting the high water mark each week. Also, when I'm done running the script on the 2009imagelist.txt do I have to perform an addtional step in order to see that more free space has been restored to my data domain.

do i need to run these commands? ./bpexpdate -deassignempty -force or ./nbdelete -allvolumes or ./bpimage -cleanup -allclients

Thanks in advance for your expert help!

  • /usr/openv/netbackup/bin/admincmd/bpexpdate -backupid $i -d 0 -force 

    should help you.. 

  • The -deassignempty is only for removable media (tapes).

    bpexpdate with -force should give you what you need.  When done with everything, run the image cleanup which will execute an nbdelete to remove the image from the disk.

  • /usr/openv/netbackup/bin/admincmd/bpexpdate -backupid $i -d 0 -force 

    should help you.. 

  • Thanks Murphy regarding the cleanup portion of my question.  Do you know how to amend my script at the end where I don't have to manually type "Y" for yes each time whereas the script does it automatically.  Thanks.