nsbin/sync-to

33 lines
532 B
Text
Raw Normal View History

#!/bin/sh
set -x
~nico/bin/backup-marker
dsthost="$1"; shift
case "$dsthost" in
loch|rloch)
2019-04-27 16:46:07 +00:00
dst=root@loch.place7.ungleich.ch:/raid/incoming/$(hostname)
;;
nico-vm)
dst=nico-vm.schottelius.org:/data
;;
*)
echo "Unknown $1" >&2
exit 1
;;
esac
start=$(date)
rsync -avS --delete --progress \
--exclude /.cache \
2019-04-17 19:01:17 +00:00
--exclude /.cdist/cache \
2020-03-20 15:44:05 +00:00
--exclude /temp/ \
--exclude /.mu/ \
--exclude /Downloads/ \
"$@" \
~/ "$dst"
end=$(date)
echo $start
echo $end