Postgres Dump and Restore

Dump

$ pg_dump dbname > outfile

Restore

$ createdb -T template0 dbname

$ psql dbname < infile

Links