File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,15 @@ ghe_remote_version_required "$GHE_HOSTNAME"
24
24
GHE_RESTORE_SNAPSHOT_PATH=" $GHE_DATA_DIR /$GHE_RESTORE_SNAPSHOT "
25
25
26
26
echo " Restoring settings ..."
27
- ghe-ssh " $GHE_HOSTNAME " -- ' ghe-import-settings' < " $GHE_RESTORE_SNAPSHOT_PATH /settings.json" 1>&3
27
+ if [ " $GHE_VERSION_MAJOR " -ge 2 ]; then
28
+ # work around issue importing settings with bad storage mode values
29
+ cat " $GHE_RESTORE_SNAPSHOT_PATH /settings.json" |
30
+ sed ' s/"storage_mode": "device"/"storage_mode": "rootfs"/' |
31
+ ghe-ssh " $GHE_HOSTNAME " -- ' ghe-import-settings' 1>&3
32
+ else
33
+ cat " $GHE_RESTORE_SNAPSHOT_PATH /settings.json" |
34
+ ghe-ssh " $GHE_HOSTNAME " -- ' ghe-import-settings' 1>&3
35
+ fi
28
36
29
37
# Bail out if we're restoring against a pre-2.x appliance. Everything below is
30
38
# supported by v2.0 appliances only.
You can’t perform that action at this time.
0 commit comments