update sync scripts
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
68572a49ba
commit
a4e1851ea7
2 changed files with 51 additions and 6 deletions
36
sync-to
Executable file
36
sync-to
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
~nico/bin/backup-marker
|
||||
|
||||
dsthost="$1"; shift
|
||||
case "$dsthost" in
|
||||
42)
|
||||
dst=42:/home/services/backup/bento
|
||||
;;
|
||||
loch)
|
||||
dst=root@loch:/home/services/backup/bento-manuell
|
||||
;;
|
||||
zuhause)
|
||||
dst=root@zuhause.schottelius.org:/home/services/backup/bento-manuell
|
||||
;;
|
||||
*)
|
||||
echo "Unknown $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
start=$(date)
|
||||
rsync -av --delete --progress \
|
||||
--exclude '/proc/*' \
|
||||
--exclude '/tmp/*' \
|
||||
--exclude '/sys/*' \
|
||||
--exclude '/dev/*' \
|
||||
--exclude '/home/users/nico/.bitcoin/blocks/' \
|
||||
--exclude '/home/users/nico/.bitcoin/chainstate/' \
|
||||
"$@" \
|
||||
/ "$dst"
|
||||
end=$(date)
|
||||
|
||||
echo $start
|
||||
echo $end
|
||||
Loading…
Add table
Add a link
Reference in a new issue