xref: /dragonfly/bin/cpdup/scripts/do_mirror (revision 0ac6bf9d)
1#!/bin/csh
2#
3# $DragonFly: src/bin/cpdup/scripts/do_mirror,v 1.1 2006/09/16 21:57:10 dillon Exp $
4
5source params
6
7if ( "$argv" == "" ) then
8    echo "do_mirror <level>"
9    exit 1
10endif
11
12echo "STARTING MIRRORS `date` level $argv"
13foreach 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
18end
19echo "WAITING FOR MIRRORS TO COMPLETE `date`"
20wait
21foreach 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
27end
28echo "DONE MIRRORING `date`"
29