mercurial/files/mercurial-s3-backup.sh
changeset 2 2556522a2a45
parent 0 df042396074e
equal deleted inserted replaced
1:fd351734f007 2:2556522a2a45
       
     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/"