sync-to 790 Bytes
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh

set -x
~nico/bin/backup-marker

dsthost="$1"; shift
case "$dsthost" in
    42)
        dst=42:/home/services/backup/bento
    ;;
    loch)
        dst=root@loch:/home/services/backup/bento-manuell
    ;;
Nico Schottelius's avatar
update  
Nico Schottelius committed
14 15
    luchsingen)
	    dst=root@luchsingen.schottelius.org:/home/services/backup/bento-manuell
Nico Schottelius's avatar
Nico Schottelius committed
16 17 18 19 20 21 22 23
    ;;
    *)
        echo "Unknown $1" >&2
        exit 1
    ;;
esac

start=$(date)
24
rsync -avS --delete --progress 	\
Nico Schottelius's avatar
Nico Schottelius committed
25 26 27 28
	--exclude '/proc/*' 	\
	--exclude '/tmp/*' 	\
	--exclude '/sys/*' 	\
	--exclude '/dev/*' 	\
Nico Schottelius's avatar
update  
Nico Schottelius committed
29 30 31
	--exclude '/run/*' 	\
	--exclude '/home/services/usbhd' 	\
	--exclude '/home/users/nico/.cache/chromium/' \
Nico Schottelius's avatar
Nico Schottelius committed
32 33 34 35 36 37 38 39
	--exclude '/home/users/nico/.bitcoin/blocks/' 	\
	--exclude '/home/users/nico/.bitcoin/chainstate/' 	\
	"$@" 			\
	/ "$dst"
end=$(date)

echo $start
echo $end