Skip to content

Commit c6b6ba2

Browse files
authored
Merge pull request #956 from vn0bbin/patch-1
Adding start, end and run time for backup
2 parents 444246f + fba03af commit c6b6ba2

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.
@@ -254,6 +256,10 @@ if [ -z "$failures" ]; then
254256
ghe-prune-snapshots
255257
fi
256258

259+
END_TIME=$(date +%s)
260+
echo 'End time:' $END_TIME
261+
echo 'Runtime:' $(($END_TIME - $START_TIME)) 'seconds'
262+
257263
echo "Completed backup of $GHE_HOSTNAME in snapshot $GHE_SNAPSHOT_TIMESTAMP at $(date +"%H:%M:%S")"
258264

259265
# Exit non-zero and list the steps that failed.

0 commit comments

Comments
 (0)