Skip to content

Commit 5fe3243

Browse files
authored
Merge pull request #625 from johnclaus/add-ghe-restore-timing
Added basic timing around the ghe-restore process
2 parents d7d7349 + e7618a4 commit 5fe3243

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/ghe-restore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ if $instance_configured && ! $force; then
174174
fi
175175

176176
# Log restore start message locally and in /var/log/syslog on remote instance
177+
START_TIME=$(date +%s)
178+
echo 'Start time:' $START_TIME
177179
echo "Starting restore of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION from snapshot $GHE_RESTORE_SNAPSHOT"
178180
ghe_remote_logger "Starting restore from $(hostname) with backup-utils v$BACKUP_UTILS_VERSION / snapshot $GHE_RESTORE_SNAPSHOT ..."
179181

@@ -400,8 +402,13 @@ else
400402
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3
401403
fi
402404

405+
END_TIME=$(date +%s)
406+
echo 'End time:' $END_TIME
407+
echo 'Runtime:' $(($END_TIME - $START_TIME)) 'seconds'
408+
403409
echo "Restore of $GHE_HOSTNAME from snapshot $GHE_RESTORE_SNAPSHOT finished."
404410

405411
if ! $instance_configured; then
406412
echo "To complete the restore process, please visit https://$hostname/setup/settings to review and save the appliance configuration."
407413
fi
414+

0 commit comments

Comments
 (0)