nsbin/sync-to
Nico Schottelius 643b81d75d Sub path
2019-04-17 21:03:37 +02:00

30 lines
490 B
Bash
Executable file

#!/bin/sh
set -x
~nico/bin/backup-marker
dsthost="$1"; shift
case "$dsthost" in
loch|rloch)
dst=root@loch.place7.ungleich.ch:/raid/backup/${hostname}/incoming
;;
nico-vm)
dst=nico-vm.schottelius.org:/data
;;
*)
echo "Unknown $1" >&2
exit 1
;;
esac
start=$(date)
rsync -avS --delete --progress \
--exclude /.cache \
--exclude /.cdist/cache \
--exclude ~/temp/ \
"$@" \
~/ "$dst"
end=$(date)
echo $start
echo $end