Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Backup db and store to aws
- ```
- #!/bin/bash
- export FILE=dump_`date +%d-%m-%Y"_"%H_%M`.sql
- docker exec -t dokku.postgres.postgres pg_dumpall -c -U postgres > $FILE
- tar -czf ${FILE}.tgz $FILE
- aws s3 cp ./${FILE}.tgz s3://apigb-postgres-backup/ --region eu-central-1
- rm $FILE
- rm ${FILE}.tgz
- ```
Add Comment
Please, Sign In to add comment