diff -r fd351734f007 -r 2556522a2a45 mercurial/files/mercurial-s3-backup.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/files/mercurial-s3-backup.sh Sun Feb 09 12:05:37 2020 -0600 @@ -0,0 +1,10 @@ +#!/bin/bash + +BUCKET=$1 +DATE=`date --iso-8601` +BACKUP_DIR=$2 +BACKUP_TAR="/tmp/$BUCKET-$DATE.tgz" + +tar -zc -f $BACKUP_TAR $BACKUP_DIR +aws s3 mb "s3://$BUCKET/" +aws s3 cp $BACKUP_TAR "s3://$BUCKET/"