Dump a PostgreSQL database:

[email protected]:~$ pg_dump db_name -v --format=c --file=./db_name.dump

Import the dump to a new PostgreSQL database:

[email protected]:~$ createdb -E UTF8 -T template0 db_new
[email protected]:~$ pg_restore -U user -d db_new ./db_name.dump
[email protected]:~$ psql --command "ALTER DATABASE db_new OWNER TO user;"

Page 1 of 11