The procedure is as follows:
- Restore of all databases means simply restoring each individual database from each dump you took. Confirm that you have the correct backup before you restore:
pg_restore --schema-only -v dumpfile | head | grep Started
- Reload global objects from the script file, as follows:
psql -f myglobals.sql
- Reload all databases. Create the databases using parallel tasks to speed things up. This can be executed remotely without the need to transfer a dumpfile between systems. Note that there is a separate dumpfile for each database:
pg_restore -C -d postgres -j 4 dumpfile