equal
deleted
inserted
replaced
|
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/" |
|
11 |
|
12 rm $BACKUP_TAR |