Export and Import
pg_dump -U postgres -Fc -d mydb > mydb.dump
createdb -U postgres mydb_new
pg_restore -U postgres -d mydb_new -j 4 mydb.dump
💡 Custom format (-Fc) supports parallel restore with -j and built-in compression.
pg_dump -U postgres -Fc -d mydb > mydb.dump
createdb -U postgres mydb_new
pg_restore -U postgres -d mydb_new -j 4 mydb.dump