@@ -164,7 +164,7 @@ GHE_HOSTNAME="${GHE_RESTORE_HOST_OPT:-$GHE_RESTORE_HOST}"
164
164
hostname=$( echo " $GHE_HOSTNAME " | cut -f 1 -d :)
165
165
166
166
# Show usage with no <host>
167
- # [ -z "$GHE_HOSTNAME" ] && print_usage
167
+ [ -z " $GHE_HOSTNAME " ] && print_usage
168
168
169
169
# Flag to indicate if this script has stopped Actions.
170
170
ACTIONS_STOPPED=false
@@ -175,11 +175,9 @@ GHE_RESTORE_SNAPSHOT_PATH="$(ghe-restore-snapshot-path "$snapshot_id")"
175
175
GHE_RESTORE_SNAPSHOT=$( basename " $GHE_RESTORE_SNAPSHOT_PATH " )
176
176
export GHE_RESTORE_SNAPSHOT
177
177
178
+ ghe_backup_check
178
179
ghe_restore_check
179
- ghe_restore_started $GHE_RESTORE_SNAPSHOT
180
- # ghe_restore_finished
181
- echo " This happened without any problems!"
182
- exit 1
180
+
183
181
# Detect if the backup we are restoring has a leaked ssh key
184
182
echo " Checking for leaked keys in the backup snapshot that is being restored ..."
185
183
ghe-detect-leaked-ssh-keys -s " $GHE_RESTORE_SNAPSHOT_PATH " || true
@@ -262,6 +260,7 @@ START_TIME=$(date +%s)
262
260
echo ' Start time:' $START_TIME
263
261
echo " Starting restore of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION from snapshot $GHE_RESTORE_SNAPSHOT "
264
262
ghe_remote_logger " Starting restore from $( hostname) with backup-utils v$BACKUP_UTILS_VERSION / snapshot $GHE_RESTORE_SNAPSHOT ..."
263
+ ghe_restore_started $START_TIME
265
264
266
265
# Keep other processes on the VM or cluster in the loop about the restore status.
267
266
#
@@ -589,6 +588,7 @@ echo 'End time:' $END_TIME
589
588
echo ' Runtime:' $(( $END_TIME - $START_TIME )) ' seconds'
590
589
591
590
echo " Restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT finished."
591
+ ghe_restore_finished
592
592
593
593
if ! $instance_configured ; then
594
594
echo " To complete the restore process, please visit https://$hostname /setup/settings to review and save the appliance configuration."
0 commit comments