roles/mercurial/files/mercurial-s3-backup.sh
changeset 0 df042396074e
equal deleted inserted replaced
-1:000000000000 0:df042396074e
       
     1 #!/bin/bash
       
     2 
       
     3 BUCKET=$1
       
     4 DATE=`date --iso-8601`
       
     5 BACKUP_DIR=$2
       
     6 BACKUP_TAR="/tmp/$BUCKET-$DATE.tgz"
       
     7 
       
     8 tar -zc -f $BACKUP_TAR $BACKUP_DIR
       
     9 aws s3 mb "s3://$BUCKET/"
       
    10 aws s3 cp $BACKUP_TAR "s3://$BUCKET/"