diff --git a/README.md b/README.md index 0f7a0002..4f795dc8 100644 --- a/README.md +++ b/README.md @@ -230,3 +230,31 @@ python manage.py export_schema_for_cypress ``` python manage.py export_schema_graphql ``` + + +## Backup to S3 + +From https://pawelurbanek.com/heroku-postgresql-s3-backup + +### Initial setup per Heroku Dyno + +``` +heroku buildpacks:add heroku-community/awscli +heroku config:set BACKUP_AWS_ACCESS_KEY_ID=[Your AWS Access Key ID] +heroku config:set BACKUP_AWS_SECRET_ACCESS_KEY=[Your AWS Secret Access Key] +heroku config:set BACKUP_S3_BUCKET_NAME=[Your S3 bucket name] +``` + +``` +heroku authorizations:create => TOKEN +heroku config:set HEROKU_API_KEY=[TOKEN] +heroku buildpacks:add heroku-community/cli +``` + +``` +heroku config:set APP_NAME=app-name +``` + +``` +heroku config:set PG_BACKUP_PASSWORD=$(openssl rand -base64 32) +``` diff --git a/archive-backup.sh b/bin/pg-backup-to-s3 similarity index 100% rename from archive-backup.sh rename to bin/pg-backup-to-s3