Merge branch 'vendor/GREP'
[dragonfly.git] / bin / cpdup / scripts / do_mirror
1 #!/bin/csh
2 #
3 # $DragonFly: src/bin/cpdup/scripts/do_mirror,v 1.1 2006/09/16 21:57:10 dillon Exp $
4
5 source params
6
7 if ( "$argv" == "" ) then
8     echo "do_mirror <level>"
9     exit 1
10 endif
11
12 echo "STARTING MIRRORS `date` level $argv"
13 foreach i ( $backup_nfs/* )
14     set host = ${i:t}
15     if ( -d $i ) then
16         ./do_mirror_host $host $argv >& $backup_path/mirrors/${host}.log &
17     endif
18 end
19 echo "WAITING FOR MIRRORS TO COMPLETE `date`"
20 wait
21 foreach i ( ${backup_nfs}/* )
22     set host = ${i:t}
23     if ( -d $i ) then
24         echo -n "${host}: "
25         tail -1 $backup_path/mirrors/${host}.log
26     endif
27 end
28 echo "DONE MIRRORING `date`"