Skip to content

Instantly share code, notes, and snippets.

@allanlei
Created December 30, 2011 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allanlei/1537335 to your computer and use it in GitHub Desktop.
Save allanlei/1537335 to your computer and use it in GitHub Desktop.
pg_dump and upload to S3 using s3cmd
FILENAME="DATABASE.backup" && pg_dump -Fc -O -x -f "$FILENAME" DATABASE && s3cmd --acl-private put "$FILENAME" s3://S3_BUCKET && rm "$FILENAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment