Database Reference
In-Depth Information
Recreate the database into the original server using parallel tasks to speed things along.
This can be executed remotely without needing to transfer dumpfile between systems like
the following:
pg_restore -d myfreshdb -j 4 dumpfile
LOGICAL (from script dump created by pg_dump ):
Recreate the database into the original server. This can be executed remotely without needing
to transfer dumpfile between systems like the following:
psql -f myscriptdump.sql myfreshdb
LOGICAL (from script dump created by pg_dumpall ):
There's no easy way to extract the required tables from a script dump.
We need to follow the procedure, which is as follows:
F Find a suitable server, or create a new virtual server.
F Reload script in full, as follows:
psql -f myscriptdump.sql
F Once the restore is complete, you can then dump the tables in the tablespace by
following the recipe Hot logical backup of one database .
F Now recreate the database as described for logical dumps earlier in this recipe.
PHYSICAL:
To recover a single database from a physical backup we need to:
F Find a suitable server, or create a new virtual server.
F Recover database server in full, as described in previous recipes on physical recovery
including all databases and all tables. You may wish to stop at a useful point in time,
in which case you can look at the recipe on that topic later in the chapter.
F Once the restore is complete, you can then dump the tables in the database by
following the recipe Hot logical backup of one database .
F Now, recreate the database as described for logical dumps, earlier in this recipe.
 
Search WWH ::




Custom Search