File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,10 @@ 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+
290294# When restoring to a host that has already been configured, kick off a
291295# config run to perform data migrations.
292296if $cluster ; then
@@ -311,11 +315,6 @@ update_restore_status "complete"
311315# Log restore complete message in /var/log/syslog on remote instance
312316ghe_remote_logger " Completed restore from $( hostname) / snapshot ${GHE_RESTORE_SNAPSHOT} ."
313317
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-
319318echo " Completed restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT "
320319
321320if ! $cluster ; then
You can’t perform that action at this time.
0 commit comments