Restore

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.

The Restore Dialog

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:

_images/restore.png

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.