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