Annotation of openbsd/backup_config/backup_servers, Revision 1.3
1.1 andrew 1: #!/bin/sh
1.3 ! andrew 2: # $AFresh1: backup_servers,v 1.2 2009/11/17 16:49:17 andrew Exp $
1.1 andrew 3:
4: backup_dir=/var/spool/server_backups/
1.2 andrew 5: bindir=`dirname $0`
6:
7: local _filename=`sudo $bindir/backup_config | tail -1`
8: if [ "$?" -eq 0 ]; then
9: echo "copying $_filename $backup_dir"
10: cp -f $_filename $backup_dir
11: fi
1.1 andrew 12:
13: for s in \
1.2 andrew 14: rrlhcrtr0100 \
15: rrlhcrtr0200 \
16: rrlhcrtr0300 \
17: rrlhcwrt0100.wireless \
18: rrlhcweb0200 \
19: rrlhcmal1001 \
20: rrlhcdns0100 \
21: rrlhcdns0200 \
22: rrlhcdoc0100 \
1.1 andrew 23: rrlhcbld0100 \
24: ; do
1.2 andrew 25: local _filename=`ssh root@$s sh < $bindir/backup_config | tail -1`
1.1 andrew 26: if [ "$?" -eq 0 ]; then
1.2 andrew 27: echo copying root@${s}:${_filename# } $backup_dir
1.1 andrew 28: scp root@${s}:${_filename# } $backup_dir
29: fi
30: done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>