Skip to content

Instantly share code, notes, and snippets.

@kxhitiz
Last active December 19, 2015 15:38
Show Gist options
  • Save kxhitiz/5977559 to your computer and use it in GitHub Desktop.
Save kxhitiz/5977559 to your computer and use it in GitHub Desktop.
Playing with PSQL

Create .pgpass in home directory with db config options in format

hostname:port:database:username:password

Dump db:

pg_dump faves_development -U faves -h localhost -F c > mysql.dump

Restore db:

psql faves_development -h localhost -U faves < mysql.dump

Alternatives

http://dumper.io/

Gem https://github.com/meskyanichi/backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment