changeset 0 | df042396074e |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roles/mercurial/files/mercurial-s3-backup.sh Sun Feb 09 11:58:21 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/"