#!/bin/csh -f
# script to do backup on eos or eos2
set synctree = /u2/exchange/synctree

if ("$host" == "eos" ) then
	sleep 1800		# Wait 1/2 hour for eos2 to work
	echo '  ========'; date
	/bin/athena/attach -n -e eos2:/u2/exchange
	$synctree -q -s /u2/exchange -d /eos2/u2/exchange
	$synctree -q -s /u2/exchange -d /u3/exchange
endif

if ("$host" == "eos2" ) then
	echo '  ========'; date
	/usr/etc/nfsc set eos root root
	$synctree -q -s /u2/exchange -d /u3/exchange
endif

echo "Backup finished `date`."
exit
