Skip to content

Commit 6a7e635

Browse files
authored
Revert "restore host keys for cluster environment as well"
1 parent 828f7d4 commit 6a7e635

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bin/ghe-restore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,6 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
287287
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh
288288
fi
289289

290-
# restore host keys at last step before applying config changes
291-
echo "Restoring SSH host keys ..."
292-
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-ssh-host-keys' < "$GHE_RESTORE_SNAPSHOT_PATH/ssh-host-keys.tar" 1>&3
293-
294290
# When restoring to a host that has already been configured, kick off a
295291
# config run to perform data migrations.
296292
if $cluster; then
@@ -315,6 +311,11 @@ update_restore_status "complete"
315311
# Log restore complete message in /var/log/syslog on remote instance
316312
ghe_remote_logger "Completed restore from $(hostname) / snapshot ${GHE_RESTORE_SNAPSHOT}."
317313

314+
if ! $cluster; then
315+
echo "Restoring SSH host keys ..."
316+
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-ssh-host-keys' < "$GHE_RESTORE_SNAPSHOT_PATH/ssh-host-keys.tar" 1>&3
317+
fi
318+
318319
echo "Completed restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT"
319320

320321
if ! $cluster; then

0 commit comments

Comments
 (0)