Guest User

Untitled

a guest
Jan 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. ## Backup db and store to aws
  2. ```
  3. #!/bin/bash
  4. export FILE=dump_`date +%d-%m-%Y"_"%H_%M`.sql
  5. docker exec -t dokku.postgres.postgres pg_dumpall -c -U postgres > $FILE
  6. tar -czf ${FILE}.tgz $FILE
  7. aws s3 cp ./${FILE}.tgz s3://apigb-postgres-backup/ --region eu-central-1
  8. rm $FILE
  9. rm ${FILE}.tgz
  10. ```
Add Comment
Please, Sign In to add comment