nsbin/sync-to
Nico Schottelius 7f04389eec
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Do not backup movies
2024-01-10 15:28:05 +01:00

33 lines
551 B
Bash
Executable file

#!/bin/sh
set -x
~nico/bin/backup-marker
dsthost="$1"; shift
case "$dsthost" in
loch|rloch)
dst=root@loch.un.ge.nau.so:/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 \
--exclude /.cdist/cache \
--exclude /temp/ \
--exclude /.mu/ \
--exclude /movies/ \
--exclude /Downloads/ \
"$@" \
~/ "$dst"
end=$(date)
echo $start
echo $end