sync-to 506 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/incoming/$(hostname)
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
    --exclude ~/.mu/ \
Nico Schottelius's avatar
Nico Schottelius committed
26
	"$@" 			\
27
	~/ "$dst"
Nico Schottelius's avatar
Nico Schottelius committed
28 29 30 31
end=$(date)

echo $start
echo $end