2016-06-08 09:23:12 +00:00
.. _backup_server_dialog:
2018-06-15 08:14:12 +00:00
***** ***** ***** ***** ***** *** *
`Backup Server Dialog` :index:
***** ***** ***** ***** ***** *** *
2016-06-08 09:23:12 +00:00
2019-03-08 15:29:05 +00:00
Use the *Backup Server* dialog to create a plain-text script that will recreate
the selected server. You can use the pgAdmin *Query Tool* to play back a
plain-text script, and recreate the server.
2016-06-08 09:23:12 +00:00
.. image :: images/backup_server_general.png
2018-01-11 16:58:30 +00:00
:alt: Backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2016-06-08 09:23:12 +00:00
Use the fields in the *General* tab to specify the following:
2019-03-08 15:29:05 +00:00
* Enter the name of the backup file in the *Filename* field. Optionally, select
the *Browser* icon (ellipsis) to the right to navigate into a directory and
select a file that will contain the archive.
* Use the *Encoding* drop-down listbox to select the character encoding method
that should be used for the archive. **Note:** This option is visible only for
database server greater than or equal to 11.
* Use the drop-down listbox next to *Role name* to specify a role with
connection privileges on the selected server. The role will be used for
authentication during the backup.
2016-06-08 09:23:12 +00:00
2018-08-22 06:47:50 +00:00
.. image :: images/backup_server_objects.png
:alt: Type of objects option on backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2018-01-11 16:58:30 +00:00
2019-03-08 15:29:05 +00:00
* Move switches in the **Type of objects** field box to specify details about
the type of objects that will be backed up.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Only data* to the *Yes* position to limit the back
up to data.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Only schema* to limit the back up to schema-level
database objects.
2018-08-22 06:47:50 +00:00
.. image :: images/backup_server_do_not_save.png
:alt: Do not save option on backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move switches in the **Do not save** field box to select the objects that will
not be included in the backup.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Owner* to the *Yes* position to exclude commands
that set object ownership.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Privilege* to the *Yes* position to exclude
commands that create access privileges.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Tablespace* to the *Yes* position to exclude
tablespaces.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Unlogged table data* to the *Yes* position to
exclude the contents of unlogged tables.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Comments* to the *Yes* position to exclude
commands that set the comments. **Note:** This option is visible only for
database server greater than or equal to 11.
2018-08-22 06:47:50 +00:00
.. image :: images/backup_server_queries.png
:alt: Queries option on backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move switches in the **Queries** field box to specify the type of statements
that should be included in the backup.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Use Column Inserts* to the *Yes* position to dump
the data in the form of INSERT statements and include explicit column
names. Please note: this may make restoration from backup slow.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Use Insert commands* to the *Yes* position to dump
the data in the form of INSERT statements rather than using a COPY command.
Please note: this may make restoration from backup slow.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Include DROP DATABASE statement* to the *Yes*
position to include a command in the backup that will drop any existing
database object with the same name before recreating the object during a
backup.
2018-08-22 06:47:50 +00:00
.. image :: images/backup_server_disable.png
:alt: Disable option on backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move switches in the **Disable** field box to specify the type of statements
that should be excluded from the backup.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Trigger* (active when creating a data-only backup)
to the *Yes* position to include commands that will disable triggers on the
target table while the data is being loaded.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *$ quoting* to the *Yes* position to enable dollar
quoting within function bodies; if disabled, the function body will be
quoted using SQL standard string syntax.
2018-08-22 06:47:50 +00:00
.. image :: images/backup_server_miscellaneous.png
:alt: Miscellaneous option on backup server dialog
2019-03-08 15:29:05 +00:00
:align: center
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move switches in the **Miscellaneous** field box to specify miscellaneous
backup options.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *With OIDs* to the *Yes* position to include object
identifiers as part of the table data for each table.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Verbose messages* to the *No* position to instruct
*pg_dump* to exclude verbose messages.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Force double quotes on identifiers* to the *Yes*
position to force the quoting of all identifiers.
2018-08-22 06:47:50 +00:00
2019-03-08 15:29:05 +00:00
* Move the switch next to *Use SET SESSION AUTHORIZATION* to the *Yes*
position to include a statement that will use a SET SESSION AUTHORIZATION
command to determine object ownership (instead of an ALTER OWNER command).
2016-06-08 09:23:12 +00:00
2019-03-08 15:29:05 +00:00
Click the *Backup* button to build and execute a command based on your
selections; click the *Cancel* button to exit without saving work.
2016-06-08 09:23:12 +00:00
.. image :: images/backup_server_messages.png
2018-01-11 16:58:30 +00:00
:alt: Backup server success notification popup
2019-03-08 15:29:05 +00:00
:align: center
2016-06-08 09:23:12 +00:00
2018-10-22 07:05:21 +00:00
Use the **Stop Process** button to stop the Backup process.
2019-03-08 15:29:05 +00:00
If the backup is successful, a popup window will confirm success. Click *Click
here for details* on the popup window to launch the * Process Watcher*. The
*Process Watcher* logs all the activity associated with the backup and provides
additional information for troubleshooting.
2016-06-08 09:23:12 +00:00
2016-08-08 14:30:24 +00:00
.. image :: images/backup_server_process_watcher.png
2018-01-11 16:58:30 +00:00
:alt: Backup server process watcher
2019-03-08 15:29:05 +00:00
:align: center
2018-01-11 16:58:30 +00:00
2019-03-08 15:29:05 +00:00
If the backup is unsuccessful, review the error message returned by the
2020-11-04 12:01:21 +00:00
*Process Watcher* to resolve any issue.
.. note :: If you are running *pgAdmin* in *Server Mode* you can click on the |sm_icon| icon in the process watcher window to open the file location in the Storage Manager. You can use the :ref: `Storage Manager <storage_manager>` to download the backup file on the client machine .
.. |sm_icon| image :: images/sm_icon.png