mercurial/aws-s3-backup/files/mercurial-s3-backup.sh
changeset 56 59e94b4a91a2
parent 2 2556522a2a45
child 136 1751be33651f
equal deleted inserted replaced
55:376bb71909a4 56:59e94b4a91a2
       
     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/"