Browse Source

Date the logs

Fred Damstra (k8s1) 2 years ago
parent
commit
f0f6e55a62
1 changed files with 5 additions and 0 deletions
  1. 5 0
      aws-backup.sh

+ 5 - 0
aws-backup.sh

@@ -1,5 +1,8 @@
 #! /bin/bash
 
+echo ""
+echo "Starting aws backup - $(date)" | tee -a /scratch/aws-backup.log
+
 if [[ ! -v DEST_S3 ]]; then
   echo "Must specify DEST_S3 as an env variable" | tee -a /scratch/aws-backup.log
   exit -1
@@ -10,3 +13,5 @@ aws s3 sync /source ${DEST_S3} \
         --exclude gogs/gogs/log/* \
         --exclude gogs/gogs/data/sessions/* \
   2>&1 | tee -a /scratch/aws-backup.log
+
+echo "Backup Completed - $(date)"  | tee -a /scratch/aws-backup.log