sync-to 490 Bytes
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1 2 3 4 5 6 7
#!/bin/sh

set -x
~nico/bin/backup-marker

dsthost="$1"; shift
case "$dsthost" in
8
    loch|rloch)
Nico Schottelius's avatar
()  
Nico Schottelius committed
9
        dst=root@loch.place7.ungleich.ch:/raid/backup/$(hostname)/incoming
Nico Schottelius's avatar
Nico Schottelius committed
10
    ;;
11 12
    nico-vm)
        dst=nico-vm.schottelius.org:/data
Nico Schottelius's avatar
Nico Schottelius committed
13 14 15 16 17 18 19 20
    ;;
    *)
        echo "Unknown $1" >&2
        exit 1
    ;;
esac

start=$(date)
21
rsync -avS --delete --progress 	\
22
    --exclude /.cache \
23
    --exclude /.cdist/cache \
24
    --exclude ~/temp/ \
Nico Schottelius's avatar
Nico Schottelius committed
25
	"$@" 			\
26
	~/ "$dst"
Nico Schottelius's avatar
Nico Schottelius committed
27 28 29 30
end=$(date)

echo $start
echo $end