Guest User

Untitled

a guest
Apr 3rd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. export AWS_ACCESS_KEY_ID=******
  4. export AWS_SECRET_ACCESS_KEY=******
  5. BUCKET=maths-ws
  6.  
  7. DB_USER= abcd
  8. DB_PASS=****4
  9. DB_HOST=127.0.0.1
  10. DIR="/home/ubuntu/mathsheet/envm/bin/"
  11. cd $DIR
  12. source activate
  13. cd ../../maths-ws/trunk
  14.  
  15. PGPASSWORD=$DB_PASS pg_dump -Fc --no-acl -h $DB_HOST -U $DB_USER math_sheet > pg_backup.json
  16.  
  17. exec /home/ubuntu/mathsheet/envm/bin/aws s3 cp pg_backup.json s3://maths-ws/backups/db/$(date "+%Y-%m-%d-%H-%M-%S")-backup.gz --sse AES256
  18. <------ command is executing till here.My execution terminates here.
  19. exec rm -f pg_backup.json <---- this is not executing
Add Comment
Please, Sign In to add comment