#!/bin/csh -f
#
# Strategy:
# 1) list all volumes in cell
# 2) prune down to list of volumes to be backed up
# 3) iterate over list, backing up.
#
set cell=sipb.mit.edu
set path=(/afs/athena/system/afsuser/@sys/bin /afs/athena/system/afsuser/@sys/etc /afs/sipb/service/@sys /bin /usr/bin /bin/athena /usr/athena /usr/new /usr/ucb)
vos listvldb -cell $cell |awk -f /afs/sipb/project/newdump/scripts/vldb.awk >/tmp/vollist.$$
echo "preparing to back up these vols:"
cat /tmp/vollist.$$
echo -n "type return to confirm-->"
set foo = $<
set vlist = (`cat /tmp/vollist.$$`)
rm /tmp/vollist.$$

foreach i ($vlist)
	echo -n $i...
	vos backup $i -cell $cell -verbose
end
echo "backups done\!"
exit 0
