Short Notes on PSQL

From PaskvilWiki
Revision as of 16:46, 8 April 2020 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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