Veritas-bu

[Veritas-bu] Netbackup offsite question

2001-01-18 17:44:46
Subject: [Veritas-bu] Netbackup offsite question
From: Rebecca Henderson henderson.r AT ghc DOT org
Date: Thu, 18 Jan 2001 14:44:46 -0800
I was wondering if anyone has any information to share about the offsite
management
of tapes with Netbackup.
I run my offsites and eject them with a simple script but I can't get
things going
to add the back in easily. Does anyone have a script or some Ideas for
me?
here is the script I use to create my offsite list from my pool, e-mail
me the list and
eject them through the port of a STK9710.
BPIMAGELIST="/opt/openv/netbackup/bin/admincmd/bpimagelist"
VMQUERY="/opt/openv/volmgr/bin/vmquery"
VMCHANGE="/opt/openv/volmgr/bin/vmchange"

OUTPUTFILE=`date '+weekly_eject.out_%m%d%y
NOTIFY="root"

NUM_OF_TAPES=0

echo "\nRundate:`date +%a' '%h' '%d' '%H:%M`           Group Health
Cooperative" > $OUTPUTFILE
echo "==========================================================="   >>
$OUTPUTFILE
echo " List of offsite UNIX tapes created in the past week"          >>
$OUTPUTFILE
echo "===========================================================\n" >>
$OUTPUTFILE
echo " " >> $OUTPUTFILE
echo "             Volser " >> $OUTPUTFILE
echo "             ------"  >> $OUTPUTFILE 


for media in `$BPIMAGELIST -idonly -media -hoursago 120 -rl 4
2>/dev/null | sort`
do
        if [ `$VMQUERY -b -m $media |grep $media |awk '{print $3}'` =
TLD ]
        then
             NUM_OF_TAPES=`expr $NUM_OF_TAPES + 1`
                if [ $NUM_OF_TAPES -le 14 ]
                then
                     echo "      Ejecting tape ${media}!" 
                     $VMCHANGE -res -m $media -mt dlt -rt none -rh
robot -rc1 0 -rc2 0 -e -sec 5
                     echo "             $media" >> $OUTPUTFILE
                else
                     echo "             $media *" >>$OUTPUTFILE   
                fi
        fi
done

echo "--------------------------------------" >> $OUTPUTFILE
echo "Total tapes for offsite: $NUM_OF_TAPES" >> $OUTPUTFILE
echo "--------------------------------------" >> $OUTPUTFILE
echo " ">>$OUTPUTFILE
echo "To withdraw tapes from the STK 9710 unit,"       >> $OUTPUTFILE
echo "unlock the 9710's CAP (Cartridge Access Port)\n" >> $OUTPUTFILE

if [ $NUM_OF_TAPES -gt 14 ]
 then
   echo "\n* NOTE: CAP only holds 14 tapes, have UNIX Tech Support
manually" >> $OUTPUTFILE
   echo "        eject these tapes after you have emptied the 9710's
CAP\n"  >> $OUTPUTFILE

fi

#find_eject >$NUM_OF_TAPES

/usr/ucb/Mail -s "Offsite UNIX tapes ready" $NOTIFY <$OUTPUTFILE
Any Ideas out there???
Thanks in advance,
Rebecca



<Prev in Thread] Current Thread [Next in Thread>