projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f0c7318
)
it should be rsync_server, not rsync_host
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 26 Oct 2019 12:41:42 +0000
(14:41 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 26 Oct 2019 12:41:42 +0000
(14:41 +0200)
rbd-snap-backup.sh
patch
|
blob
|
history
diff --git
a/rbd-snap-backup.sh
b/rbd-snap-backup.sh
index
0f82bb1
..
fbda500
100755
(executable)
--- a/
rbd-snap-backup.sh
+++ b/
rbd-snap-backup.sh
@@
-5,9
+5,9
@@
test -z "$1" -o -z "$2" && echo "Usage: $0 instance disk" && exit 1
instance=$1
disk=$2
test -z "$backup" && backup="backup"
instance=$1
disk=$2
test -z "$backup" && backup="backup"
-test -z "$rsync_
host" && rsync_host
="lib15"
+test -z "$rsync_
server" && rsync_server
="lib15"
-test "`rsync $rsync_
host::$backup/$instance/$disk 2>/dev/null | wc -l`" != 1 && echo "ERROR $rsync_host
::$backup/$instance/$disk backup target missing" && exit 1
+test "`rsync $rsync_
server::$backup/$instance/$disk 2>/dev/null | wc -l`" != 1 && echo "ERROR $rsync_server
::$backup/$instance/$disk backup target missing" && exit 1
rbd_image=`gnt-instance info --static $instance | grep logical_id: | cut -d\' -f4 | grep "\.rbd\.disk$disk\$"`
rbd_image=`gnt-instance info --static $instance | grep logical_id: | cut -d\' -f4 | grep "\.rbd\.disk$disk\$"`
@@
-28,16
+28,16
@@
test ! -z "$offset" && offset=",offset=$offset"
mount $rbd_dev /dev/shm/$rbd_image.snap -o noatime$offset
mount $rbd_dev /dev/shm/$rbd_image.snap -o noatime$offset
-# XXX do rsync back to $rsync_
host
+# XXX do rsync back to $rsync_
server
rsync_args=""
rsync_args=""
-if rsync $rsync_
host
::$backup/$instance/rsync.args /dev/shm/$instance-rsync.args 2>/dev/null ; then
+if rsync $rsync_
server
::$backup/$instance/rsync.args /dev/shm/$instance-rsync.args 2>/dev/null ; then
rsync_args="`cat /dev/shm/$instance-rsync.args`"
fi
rsync -ravHzXA --inplace --numeric-ids --delete $rsync_args \
rsync_args="`cat /dev/shm/$instance-rsync.args`"
fi
rsync -ravHzXA --inplace --numeric-ids --delete $rsync_args \
- /dev/shm/$rbd_image.snap/ $rsync_
host
::$backup/$instance/$disk/ \
-&& ssh -i /etc/ganeti/id_dsa-zfs-snap $rsync_
host $rsync_host
/$backup/$instance/$disk
+ /dev/shm/$rbd_image.snap/ $rsync_
server
::$backup/$instance/$disk/ \
+&& ssh -i /etc/ganeti/id_dsa-zfs-snap $rsync_
server $rsync_server
/$backup/$instance/$disk
# XXX backup OK
# XXX backup OK