Skip to content

Instantly share code, notes, and snippets.

@zekitow
Last active August 29, 2015 14:26
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 zekitow/2643732e9b84b9670e4c to your computer and use it in GitHub Desktop.
Save zekitow/2643732e9b84b9670e4c to your computer and use it in GitHub Desktop.
Postgres - Command line

After Install

sudo -u postgres createuser -s $USER

Command line login

psql -d USERNAME -U DB_NAME

Backup restore

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U USERNAME -d DB_NAME production.dump

Grab download from HEROKU

heroku pg:backups public-url  --app APP-NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment