How can I import a dumped database into Postgres?
In which I remind myself how to import a Postgres database
- Published
- Tags
- databases
- postgres
Using pg_restore, it’s almost the same process as pg_dump but in reverse
pg_restore --dbname={{DBNAME}} --host={{HOST}} --port={{PORT}} --username={{USERNAME}} --password --jobs 2 {{NAME}}.dump
You can use -j to parallelize restoration ie; pg_dump -j 41.