Notes

Dump/Restore Postgres DB to/from archive

Posted by Dan on Saturday the 18th of March, 2017

Dump a Postgres DB to a Gzip archive:

pg_dump db -U user | gzip > db.sql.gz

Restore dumped Gzip:

gunzip -c db.sql.gz | psql -U user db
Posted in: Linux