Skip to content

Commit 592d8a1

Browse files
authored
Adding start, end and run time for backup
1 parent 37901d5 commit 592d8a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/ghe-backup

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ fi
139139

140140
echo "$GHE_SNAPSHOT_TIMESTAMP $$" > ../in-progress
141141

142+
START_TIME=$(date +%s)
143+
echo 'Start time:' $START_TIME
142144
echo "Starting backup of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION in snapshot $GHE_SNAPSHOT_TIMESTAMP"
143145

144146
# Perform a host connection check and establish the remote appliance version.
@@ -270,5 +272,9 @@ fi
270272
echo "Checking for leaked ssh keys ..."
271273
ghe-detect-leaked-ssh-keys -s "$GHE_SNAPSHOT_DIR" || true
272274

275+
END_TIME=$(date +%s)
276+
echo 'End time:' $END_TIME
277+
echo 'Runtime:' $(($END_TIME - $START_TIME)) 'seconds'
278+
273279
# Make sure we exit zero after the conditional
274280
true

0 commit comments

Comments
 (0)