Short Notes on PSQL

From PaskvilWiki
Jump to: navigation, search

PSQL aka Postgres aka PostgreSQL... I prefer psql.

Dump and Restore

dump:
$ pg_dump -h host -p 5432 -U user -F c -b -v -f /tmp/db_name.backup db_name
restore:
$ pg_restore -h host -p 5432 -U user -d db_name -v /tmp/db_name.backup