Skip to content

Commit 832ae27

Browse files
committed
using the latest aws-cli instead of a prepackaged version
1 parent 06e2589 commit 832ae27

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.buildpacks

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
https://github.com/gregburek/heroku-buildpack-toolbelt.git
2-
https://github.com/peterkeen/heroku-buildpack-vendorbinaries

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.swp
2+
tmp

.vendor_urls

Lines changed: 0 additions & 1 deletion
This file was deleted.

bin/backup.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ if [[ -z "$S3_BUCKET_PATH" ]]; then
1818
exit 1
1919
fi
2020

21+
#install aws-cli
22+
curl https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip
23+
jar xvf awscli-bundle.zip
24+
./awscli-bundle/install -i /tmp/aws
25+
2126
BACKUP_FILE_NAME="$(date +"%Y-%m-%d-%H-%M")-$APP-$DATABASE.dump"
2227

2328
/app/vendor/heroku-toolbelt/bin/heroku pgbackups:capture $DATABASE -e --app $APP
2429
curl -o $BACKUP_FILE_NAME `/app/vendor/heroku-toolbelt/bin/heroku pgbackups:url --app $APP`
2530
gzip $BACKUP_FILE_NAME
26-
/app/vendor/awscli/bin/aws s3 cp $BACKUP_FILE_NAME.gz s3://$S3_BUCKET_PATH/$APP/$DATABASE/$BACKUP_FILE_NAME.gz
31+
/tmp/aws/bin/aws s3 cp $BACKUP_FILE_NAME.gz s3://$S3_BUCKET_PATH/$APP/$DATABASE/$BACKUP_FILE_NAME.gz
2732
echo "backup $BACKUP_FILE_NAME complete"
2833

0 commit comments

Comments
 (0)