sync-to 756 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.place5.ungleich.ch:/home/services/backup/notebook-manuell/home/users/nico/
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 21
    freiheit)
        dst=freiheit:
    ;;
    local)
	    dst=root@192.168.0.20:/home/services/backup/notebook-manuell/home/users/nico/
    ;;
    nico-data)
	    dst=nico-data.schottelius.org:/home/nico
Nico Schottelius's avatar
Nico Schottelius committed
22 23 24 25 26 27 28 29
    ;;
    *)
        echo "Unknown $1" >&2
        exit 1
    ;;
esac

start=$(date)
30
rsync -avS --delete --progress 	\
31 32 33
	--exclude-from=/home/users/nico/.ccollect/defaults/exclude \
    --exclude /.cache \
    --exclude ~/temp/ \
Nico Schottelius's avatar
Nico Schottelius committed
34
	"$@" 			\
35
	~/ "$dst"
Nico Schottelius's avatar
Nico Schottelius committed
36 37 38 39
end=$(date)

echo $start
echo $end