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)
|
|
|
|
dst=root@$dsthost:/home/services/backup/notebook-manuell/home/users/nico/
|
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
|
|
|
;;
|
2017-03-08 06:37:05 +00:00
|
|
|
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
|
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-from=/home/users/nico/.ccollect/defaults/exclude \
|
|
|
|
--exclude /.cache \
|
|
|
|
--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
|