<---------------------MOVE DRM MACRO------------------------>
move drm * so=dbb wherestate=mo tostate=vault remove=no WAIT=YES
move drm * so=dbb wherestate=vaultr tostate=onsiter
<------------------------Cut Below-------------------------->
#!/bin/ksh
cd /usr/tivoli/tsm/client/ba/bin
ADSMID=`cat /usr/local/scripts/ADSMID`
ADSMPASS=`cat /usr/local/scripts/ADSMPASS`
OFFSITE=/usr/tivoli/tsm/client/ba/bin/OFFSITE/offsite.txt
DRVOLS=/usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List
RETRIEVE=/usr/tivoli/tsm/client/ba/bin/OFFSITE/retrieve.txt
set -A SERV TSM-1 TSM-2 TSM-3 TSM-4
cp $OFFSITE "$OFFSITE.BAK"
mv /usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List /usr/tivoli/tsm/client/ba/bin/OFFSITE/Vol_List.bak
printf "Use this list to determine tapes that are to go offsite report any discrepancies to the Recovery Services Team.\n\n" > $OFFSITE
printf " \n\n" >> $OFFSITE
printf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n" >> $OFFSITE
printf " The following tapes will checkout from the library\n\n" >> $OFFSITE
printf " and should be sent offsite\n\n" >> $OFFSITE
printf " Current as of: `date`\n\n" >> $OFFSITE
printf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n" >> $OFFSITE
printf "Use this list to determine tapes that are to come back onsite from Iron Mountain for reuse. Report any discrepancies to the Recovery Service Team.\n\n" > $RETRIEVE
printf " \n\n" >> $RETRIEVE
printf "********************************************************\n\n" >> $RETRIEVE
printf " Tapes to be brought back onsite from Iron Mountain\n" >> $RETRIEVE
printf " and placed back into TSM library for scratch.\n\n" >> $RETRIEVE
printf " Current as of: `date`\n\n" >> $RETRIEVE
printf "********************************************************\n\n" >> $RETRIEVE
i=0
while [ $i -lt 4 ]
do
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} -dataonly=yes "select volume_name from drmedia where state='MOUNTABLE' and volume_name not in (select volume_name from drives where volume_name is not NULL) " grep L[0-4] >> $DRVOLS
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} -dataonly=yes "select volume_name from drmedia where state='VAULTRETRIEVE' " grep L[0-4] >> $RETRIEVE
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=${SERV[$i]} 'macro /usr/tivoli/tsm/client/ba/bin/move_drmedia.mac'
sleep 120
i=$(( $i + 1 ))
done
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=
sleep 180
dsmadmc -id=$ADSMID -password=$ADSMPASS -servername=
cat $DRVOLS sort >> $OFFSITE
mail -s "Daily Tape Rotation - Tapes to be sent to Iron Mountain" tape_rpt < $OFFSITE mail -s "Daily Tape Return" tape_rpt < $RETRIEVE
No comments:
Post a Comment