File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -287,10 +287,6 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
287287 ghe-ssh " $GHE_HOSTNAME " -- /bin/sh
288288fi
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.
296292if $cluster ; then
@@ -315,6 +311,11 @@ update_restore_status "complete"
315311# Log restore complete message in /var/log/syslog on remote instance
316312ghe_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+
318319echo " Completed restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT "
319320
320321if ! $cluster ; then
You can’t perform that action at this time.
0 commit comments