#!/bin/csh
#
# $DragonFly: src/bin/cpdup/scripts/do_remote,v 1.1 2006/09/16 21:57:10 dillon Exp $

source params

if ( "$argv" == "" ) then
    echo "do_mirror <level>"
    exit 1
endif

echo "STARTING OFFSITE MIRRORS `date`"
foreach i ( ${backup_nfs}/* )
    set host = ${i:t}
    if ( -d $i ) then
	./do_remote_host $host $argv >& $backup_path/mirrors/remote.${host}.log &
    endif
end
echo "WAITING FOR MIRRORS TO COMPLETE `date`"
wait
foreach i ( ${backup_nfs}/* )
    set host = ${i:t}
    if ( -d $i ) then
	echo -n "${host}: "
	tail -1 $backup_path/mirrors/remote.${host}.log
    endif
end
echo "DONE WITH OFFSITE MIRRORS `date`"
