Skip to content

Instantly share code, notes, and snippets.

@bkvirendra
Created May 11, 2013 07:34
Show Gist options
  • Save bkvirendra/5559219 to your computer and use it in GitHub Desktop.
Save bkvirendra/5559219 to your computer and use it in GitHub Desktop.
# take a backup of Database using pg_dump
# replace the postgres with Database username and the dbname with the Database name
# save it to a tar file
pg_dump --username=postgres -h localhost -F tar dbname > $(date "+%Y%m%d.tar")
# upload the DB backup to Dropbox
python uploader.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment