Ask a Question
Report a Bug
This page in other versions:
By selecting fields on the Restore dialog, you specify which options should be included in a customized pg_restore command. The pg_restore command plays back an archive that recreates the database, database object, or data described by commands within the archive.
If your archive is in a Custom, Tar, or Directory format, you can use the Restore dialog to restore from the archive. If you have saved the backup in Plain format, use the psql client to restore.
Please Note: If you are restoring into an existing database, you must ensure that any objects that might create conflicts because of pre-existing constraints or dependencies are dropped or truncated; use the DROP CASCADE or TRUNCATE CASCADE options on the context menu to clean up existing conflicts before performing a restore.
To open the Restore dialog, right click on the name of an object in the tree control and select Restore from the context menu. The Restore dialog opens:
Use the fields on the File Options tab to general information about the backup archive.
* Use the Format field to select the file format of the archive you are restoring. pgAdmin can restore from a Custom file (pg_dump format), a Tar file, or a Directory format file.
* Use the Filename field to specify the name of the backup archive that will be used for the restore; optionally, use the file browser to navigate to and select the file.
* Use the Number of Jobs field to instruct the server to use multiple concurrent jobs for the restore. The optimal value for this option depends on the hardware setup of the server, of the client, and of the network. This option is supported only by the Custom and Directory archive formats.
* Use the Rolename field to specify the name of the role that will be used when invoking pg_restore.
When you’ve completed the File Options tab, navigate to the Restore Options #1 tab:
Use the fields on the Restore Options #1 tab to specify details about the type of objects that will be restored.
When you’ve completed the Restore Options #1 tab, select the Restore Options #2 tab:
When you’ve completed the Restore Options #2 tab, navigate to the Objects tab:
Click the Display objects button to populate the tree control on the Objects tab; when the list of objects is displayed, check the box to the left of an object name to include that object from the restore.
When you’ve completed the tabs, navigate to the Messages tab, and press OK.
When the restoration completes, the Messages tab displays details about the restoration process:
If the restore was successful, the Messages tab will display:
Process returned exit code 0.
If you receive an exit code other than 0, scroll through the Messages window to locate the problem; after correcting the problem, you can repeat the process.
Scroll to the top of the Messages dialog to view the executed pg_restore command. When you’re finished, click Done to exit the Restore dialog.