File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ cd $(dirname "$0")/../..
1616ghe_remote_version_required " $GHE_HOSTNAME "
1717
1818# Force a redis BGSAVE, and wait for it to complete.
19+ sudo=
20+ [ " $GHE_VERSION_MAJOR " -ge 2 ] && sudo=" sudo"
1921ghe-ssh " $GHE_HOSTNAME " /bin/sh << EOF
2022 set -e
2123 timestamp=\$ (redis-cli LASTSAVE)
2224 redis-cli BGSAVE 1>/dev/null
2325 while [ \$ (redis-cli LASTSAVE) -eq \$ timestamp ]; do
2426 sleep 1
2527 done
26- cat '$GHE_REMOTE_DATA_USER_DIR /redis/dump.rdb'
28+ $sudo cat '$GHE_REMOTE_DATA_USER_DIR /redis/dump.rdb'
2729EOF
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ echo "* Transferring settings data ..." 1>&3
2121ghe-ssh " $host " -- ' ghe-export-settings' > settings.json
2222
2323echo " * Transferring license data ..." 1>&3
24- ghe-ssh " $host " -- " cat '$GHE_REMOTE_LICENSE_FILE '" > enterprise.ghl
24+ comm=" cat '$GHE_REMOTE_LICENSE_FILE '"
25+ [ " $GHE_VERSION_MAJOR " -ge 2 ] && comm=" sudo $comm "
26+ ghe-ssh " $host " -- " $comm " > enterprise.ghl
2527
2628if [ " $GHE_VERSION_MAJOR " -ge 2 ]; then
2729 echo " * Transferring management console password ..." 1>&3
You can’t perform that action at this time.
0 commit comments