Skip to content

Commit e0244d8

Browse files
committed
Merge pull request #22 from github/ghebuver2
Give VM a chance to reject old backup-utils versions
2 parents 12f5638 + e6ef470 commit e0244d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

share/github-backup-utils/ghe-maintenance-mode-enable

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fi
4444

4545
# SSH to the appliance and run the remote maintenance mode enable command
4646
echo "Enabling maintenance mode on $host ..."
47-
ghe-ssh "$host" -- "ghe-maintenance -s"
47+
ghe-ssh "$host" -- "/usr/bin/env GHEBUVER=2 ghe-maintenance -s"
4848

4949
# Bail out early if --no-wait was given.
5050
$wait_procs || exit 0

share/github-backup-utils/ghe-restore-settings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
2828
# work around issue importing settings with bad storage mode values
2929
cat "$GHE_RESTORE_SNAPSHOT_PATH/settings.json" |
3030
sed 's/"storage_mode": "device"/"storage_mode": "rootfs"/' |
31-
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-settings' 1>&3
31+
ghe-ssh "$GHE_HOSTNAME" -- '/usr/bin/env GHEBUVER=2 ghe-import-settings' 1>&3
3232
else
3333
cat "$GHE_RESTORE_SNAPSHOT_PATH/settings.json" |
34-
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-settings' 1>&3
34+
ghe-ssh "$GHE_HOSTNAME" -- '/usr/bin/env GHEBUVER=2 ghe-import-settings' 1>&3
3535
fi
3636

3737
# Bail out if we're restoring against a pre-2.x appliance. Everything below is

0 commit comments

Comments
 (0)