Last Updated: February 25, 2016
·
452
· fuzzyalej

Dump/Restore a database in postgresql

Dump a database

pg_dump -U user -f file.tar -Ft database

Restore a database

pg_restore -U user -d database file.tar