File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,21 +22,21 @@ ghe-ssh "$GHE_HOSTNAME" /bin/bash <<EOF
22
22
set -e
23
23
24
24
redis_host=\$ (ghe-config cluster.redis-master 2>/dev/null || echo "localhost")
25
- timestamp=\$ (redis-cli -h \$ redis_host LASTSAVE)
25
+ timestamp=\$ (ghe- redis-cli --remote -h \$ redis_host LASTSAVE)
26
26
27
27
for i in \$ (seq 10); do
28
- if ! redis-cli -h \$ redis_host BGSAVE | grep -q ERR; then
28
+ if ! ghe- redis-cli --remote -h \$ redis_host BGSAVE | grep -q ERR; then
29
29
break
30
30
fi
31
31
sleep 15
32
32
done
33
33
for n in \$ (seq 3600); do
34
- if [ "\$ (redis-cli -h \$ redis_host LASTSAVE)" != "\$ timestamp" ]; then
34
+ if [ "\$ (ghe- redis-cli --remote -h \$ redis_host LASTSAVE)" != "\$ timestamp" ]; then
35
35
break
36
36
fi
37
37
sleep 1
38
38
done
39
- [ "\$ (redis-cli -h \$ redis_host LASTSAVE)" != "\$ timestamp" ] # exits 1 if bgsave didn't work
39
+ [ "\$ (ghe- redis-cli --remote -h \$ redis_host LASTSAVE)" != "\$ timestamp" ] # exits 1 if bgsave didn't work
40
40
41
41
if [ "\$ redis_host" != "localhost" ]; then
42
42
ssh \$ redis_host sudo cat '$GHE_REMOTE_DATA_USER_DIR /redis/dump.rdb'
Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ while true; do
18
18
echo " fake redis data" > " $GHE_REMOTE_DATA_USER_DIR /redis/dump.rdb"
19
19
break
20
20
;;
21
- -h )
22
- # Fake accepting hostname argument
23
- shift 2
21
+ --remote )
22
+ # Fake accepting remote flag argument
23
+ shift 3
24
24
;;
25
25
* )
26
- echo " unexpected redis-cli command: $1 " 1>&2
26
+ echo " unexpected ghe- redis-cli command: $1 " 1>&2
27
27
exit 1
28
28
;;
29
29
esac
You can’t perform that action at this time.
0 commit comments