Database:postgres
This is an old revision of the document!
Dump local database to file
PGDATABASE=mydb pg_dump -Fc -Z 9 -d $PGDATABASE -U $POSTGRES_USER > /tmp/$PGDATABASE.dump
Import dump file in existing local database
PGDATABASE=mydb pg_restore --clean -Fc -j 8 -d $PGDATABASE -U $POSTGRES_USER /tmp/db.sql