Skip to content

Instantly share code, notes, and snippets.

@chrisdpeters
Last active August 29, 2015 13:56
Show Gist options
  • Save chrisdpeters/9080178 to your computer and use it in GitHub Desktop.
Save chrisdpeters/9080178 to your computer and use it in GitHub Desktop.
PostgreSQL Backup and Restore Commands
$ pg_dump -h [host address] -p [port] -U [username] [database name] -F t -f [file path]
$ pg_restore --verbose --clean --no-acl --no-owner -h [host address] -p [port] -U [username] -d [name] [file path]
$ heroku pgbackups:capture -a [APP_NAME]
$ heroku pgbackups:url -a [APP_NAME]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment