Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Offsite list for Specific pools.

Status
Not open for further replies.

ttalk

MIS
Oct 23, 2002
4
US
Hi All,

I'm trying to create a list of tapes to go offsite each week on Tuesday for about 4 of my 8 pools and have not as yet determined a good way to do this with NetBackup 4.5.

Guess this is the part where I say I'm new to NetBackup...

What I want to output is a list of all media/volumes currently in the library that have been written to for a specific pool.

I've looked at available_media and vmquery but neither really give me the output I'm looking for. I don't see where you can specify only a specific pool for available_media and vmquery does not show something like amount of data on media. Anyone have any thoughts? Am I trying to go about this all wrong? Thanks
 
You Can't.... But I've written something that my help.

You'll have to change the paths and pools to match your needs.

avtapes.sh

#!/bin/ksh

#
# Media Management
#
clear

echo "Gathering Data....... Please Wait...!\n"

#
# Gathering initial data
#

/usr/openv/netbackup/bin/goodies/available_media > /tmp/look

#
# Altering data to enable awk script to run
#

echo "#!/usr/bin/sed -f" > /tmp/change.it
echo "/^$/d" >> /tmp/change.it
echo "/^---/d" >> /tmp/change.it
echo "/^m/d" >> /tmp/change.it
echo "/^ ID/d" >> /tmp/change.it

chmod 777 /tmp/change.it

/tmp/change.it < /tmp/look > /tmp/look1

#
# Split media pools
#

awk -f /usr/openv/netbackup/bin/sort.awk /tmp/look1

#
# Tidy up
#

rm /tmp/change.it
rm /tmp/look

#
# Setup Continue
#

Cont () {
echo &quot;\n Hit enter to continue...\c&quot;
read z
}

#
# Check Daily Pool Loaded in L180
#

CHECK_DAILY_IN () {
clear
echo &quot;\nDaily Pool\nTapes Currently Loaded & Available To The Robot\n&quot;
cat poolDaily|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Dailypoolinfo
done

cat /tmp/Dailypoolinfo|grep AVAILABLE|grep SSC|grep -v - > /tmp/aamdp
pg -20 /tmp/aamdp
rm /tmp/Dailypoolinfo
rm /tmp/aamdp
}

CHECK_DAILY_OUT () {
clear
echo &quot;\nDaily Pool\nTapes Currently Offsite & Available To Use\n&quot;
cat poolDaily|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Dailypoolinfo
done

cat /tmp/Dailypoolinfo|grep AVAILABLE|grep SSC|grep - > /tmp/oamdp
pg -20 /tmp/oamdp
rm /tmp/Dailypoolinfo
rm /tmp/oamdp
}

CHECK_WIN2000_IN () {
clear
echo &quot;\nWindows 2000 Pool\nTapes Currently Loaded & Available To The Robot\n&quot;
cat poolWindows2000_OS|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Win2kpoolinfo
done

cat /tmp/Win2kpoolinfo|grep AVAILABLE|grep SSC|grep -v - > /tmp/aamw2kp
pg /tmp/aamw2kp
rm /tmp/Win2kpoolinfo
rm /tmp/aamw2kp
}

CHECK_WIN2000_OUT () {
clear
echo &quot;\nWindows 2000\nTapes Currently Offsite & Available To Use\n&quot;
cat poolWindows2000_OS|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Win2kpoolinfo
done

cat /tmp/Win2kpoolinfo|grep AVAILABLE|grep SSC|grep - > /tmp/oamw2kp
pg /tmp/oamw2kp
rm /tmp/Win2kpoolinfo
rm /tmp/oamw2kp
}

CHECK_FROZEN_IN () {
clear
echo &quot;\nDaily Pool\nTapes Currently Loaded & Frozen\n&quot;
cat poolDaily|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Dailypoolinfo
done

cat /tmp/Dailypoolinfo|grep FROZEN|grep SSC| grep -v - > /tmp/aftdp
pg /tmp/aftdp
rm /tmp/Dailypoolinfo
rm /tmp/aftdp
}

CHECK_FROZEN_OUT () {
clear
echo &quot;\nDaily Pool\nTapes Currently Offsite & Frozen\n&quot;
cat poolDaily|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/Dailypoolinfo
done

cat /tmp/Dailypoolinfo|grep FROZEN|grep SSC| grep - > /tmp/aftdp
pg /tmp/aftdp
rm /tmp/Dailypoolinfo
rm /tmp/aftdp
}

CHECK_W2K_FROZEN_IN () {
clear
echo &quot;\nWin 2000 Pool\nTapes Currently Loaded & Frozen\n&quot;
cat poolWindows2000_OS|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/W2Kpoolinfo
done

cat /tmp/W2Kpoolinfo|grep FROZEN|grep SSC| grep -v - > /tmp/aftdp
pg /tmp/aftdp
rm /tmp/W2Kpoolinfo
rm /tmp/aftdp
}

CHECK_W2K_FROZEN_OUT () {
clear
echo &quot;\nWin 2000 Pool\nTapes Currently Offsite & Frozen\n&quot;
cat poolWindows2000_OS|while read A B C D E F G H I
do
echo $A $E $I >> /tmp/W2Kpoolinfo
done

cat /tmp/W2Kpoolinfo|grep FROZEN|grep SSC| grep - > /tmp/aftdp
pg /tmp/aftdp
rm /tmp/W2Kpoolinfo
rm /tmp/aftdp
}

#
# Main Menu
#

while true
do
clear

echo &quot;\n\t-------------------------------------------&quot;
echo &quot;\t\t\tAvailable Media&quot;
echo &quot;\t-------------------------------------------\n&quot;
echo &quot;\t\t1. View Available Unix Tapes Loaded in Robot&quot;
echo &quot;\t\t2. View Available Unix Tapes Offsite&quot;
echo &quot;\t\t3. View Available Win2000 Tapes Loaded in Robot&quot;
echo &quot;\t\t4. View Available Win2000 Tapes Offsite&quot;
echo &quot;\t\t5 View Frozen Unix Tapes Loaded in Robot&quot;
echo &quot;\t\t6. View Frozen Unix Tapes Offsite&quot;
echo &quot;\t\t7. View Frozen Win2000 Tapes Loaded in Robot&quot;
echo &quot;\t\t8. View Frozen Win2000 Tapes Offsite&quot;
echo &quot;\t\tQ. Quit&quot;
echo &quot;\n\t-------------------------------------------\n&quot;
echo &quot;\tPlease Enter Your Selection ..\b\b\c&quot;
read ANS

case $ANS in
1) CHECK_DAILY_IN
Cont
;;
2) CHECK_DAILY_OUT
Cont
;;
3) CHECK_WIN2000_IN
Cont
;;
4) CHECK_WIN2000_OUT
Cont
;;
5) CHECK_FROZEN_IN
Cont
;;
6) CHECK_FROZEN_OUT
Cont
;;
7) CHECK_W2K_FROZEN_IN
Cont
;;
8) CHECK_W2K_FROZEN_OUT
Cont
;;
q|Q) exit
;;
*) echo &quot;Wrong input...&quot; ; Cont
unset inp
;;
esac
done



--
| Mike Nixon
| Unix Admin
| ----------------------------
 
Cool! I'll have a look at this one. What's the contents of the /usr/openv/netbackup/bin/sort.awk file?
 
sort.awk


{
if ($2 == &quot;pool&quot;){
if (fn ==&quot;&quot;) close(fn)
fn = $2 $1 # or &quot;file&quot; ++ix
}
print > fn
} --
| Mike Nixon
| Unix Admin
| ----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top