|
|
|
|
| <!DOCTYPE html>
|
|
|
| <html lang="en" data-content_root="./">
|
| <head>
|
| <meta charset="utf-8" />
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
| <title>Backup Dialog — pgAdmin 4 8.6 documentation</title>
|
| <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
| <link rel="stylesheet" type="text/css" href="_static/style.css?v=d36593c3" />
|
|
|
| <script src="_static/documentation_options.js?v=d4c83366"></script>
|
| <script src="_static/doctools.js?v=9a2dae69"></script>
|
| <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
|
| <script src="_static/sidebar.js"></script>
|
|
|
| <link rel="index" title="Index" href="genindex.html" />
|
| <link rel="search" title="Search" href="search.html" />
|
| <link rel="next" title="Backup Globals Dialog" href="backup_globals_dialog.html" />
|
| <link rel="prev" title="Backup and Restore" href="backup_and_restore.html" />
|
| </head><body>
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <h3>Navigation</h3>
|
| <ul>
|
| <li class="right" style="margin-right: 10px">
|
| <a href="genindex.html" title="General Index"
|
| accesskey="I">index</a></li>
|
| <li class="right" >
|
| <a href="backup_globals_dialog.html" title="Backup Globals Dialog"
|
| accesskey="N">next</a> |</li>
|
| <li class="right" >
|
| <a href="backup_and_restore.html" title="Backup and Restore"
|
| accesskey="P">previous</a> |</li>
|
| <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
|
| <li class="nav-item nav-item-1"><a href="backup_and_restore.html" accesskey="U">Backup and Restore</a> »</li>
|
| <li class="nav-item nav-item-this"><a href="">Backup Dialog</a></li>
|
| </ul>
|
| </div>
|
|
|
| <div class="document">
|
| <div class="documentwrapper">
|
| <div class="bodywrapper">
|
| <div class="body" role="main">
|
|
|
| <section id="backup-dialog">
|
| <span id="id1"></span><h1><span class="target" id="index-0"></span>Backup Dialog<a class="headerlink" href="#backup-dialog" title="Link to this heading">¶</a></h1>
|
| <p><em>pgAdmin</em> uses the <em>pg_dump</em> utility to provide an easy way to create a backup
|
| in a plain-text or archived format. You can then use a client application (like
|
| <em>psql</em> or the <em>Query Tool</em>) to restore a plain-text backup file, or use the
|
| Postgres <em>pg_restore</em> utility to restore an archived backup. The <em>pg_dump</em>
|
| utility must have read access to all database objects that you want to back up.</p>
|
| <p>You can backup a single table, a schema, or a complete database. Select the name
|
| of the backup source in the <em>pgAdmin</em> tree control, right click to open the
|
| context menu, and select <em>Backup…</em> to open the <em>Backup</em> dialog. The name of
|
| the object selected will appear in the dialog title bar.</p>
|
| <img alt="Backup dialog general tab" class="align-center" src="_images/backup_general.png" />
|
| <p>Use the fields in the <em>General</em> tab to specify parameters for the backup:</p>
|
| <ul>
|
| <li><p>Enter the name of the backup file in the <em>Filename</em> field. Optionally, select
|
| the <em>Browser</em> icon (…) to the right to navigate into a directory and select
|
| a file that will contain the archive.</p></li>
|
| <li><p>Use the drop-down listbox in the <em>Format</em> field to select the format that is
|
| best suited for your application. Each format has advantages and
|
| disadvantages:</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Select <em>Custom</em> to create a custom archive file that you can use with
|
| <em>pg_restore</em> to create a copy of a database. Custom archive file formats
|
| must be restored with <em>pg_restore</em>. This format offers the opportunity to
|
| select which database objects to restore from the backup file. <em>Custom</em>
|
| archive format is recommended for medium to large databases as it is
|
| compressed by default.</p></li>
|
| <li><p>Select <em>Tar</em> to generate a tar archive file that you can restore with
|
| <em>pg_restore</em>. The tar format does not support compression.</p></li>
|
| <li><p>Select <em>Plain</em> to create a plain-text script file. A plain-text script file
|
| contains SQL statements and commands that you can execute at the <em>psql</em>
|
| command line to recreate the database objects and load the table data. A
|
| plain-text backup file can be edited in a text editor, if desired, before
|
| using the <em>psql</em> program to restore database objects. <em>Plain</em> format is
|
| normally recommended for smaller databases; script dumps are not
|
| recommended for blobs. The SQL commands within the script will reconstruct
|
| the database to the last saved state of the database. A plain-text script
|
| can be used to reconstruct the database on another machine, or (with
|
| modifications) on other architectures.</p></li>
|
| <li><p>Select <em>Directory</em> to generate a directory-format archive suitable for use
|
| with <em>pg_restore</em>. This file format creates a directory with one file for
|
| each table and blob being dumped, plus a <em>Table of Contents</em> file
|
| describing the dumped objects in a machine-readable format that
|
| <em>pg_restore</em> can read. This format is compressed by default.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| <li><p>Use the <em>Compression Ratio</em> field to select a compression level for the
|
| backup. Specify a value of zero to mean use no compression; specify a maximum
|
| compression value of 9. Please note that tar archives do not support
|
| compression.</p></li>
|
| <li><p>Use the <em>Encoding</em> drop-down listbox to select the character encoding method
|
| that should be used for the archive.</p></li>
|
| <li><p>Use the <em>Number of Jobs</em> field (when applicable) to specify the number of
|
| tables that will be dumped simultaneously in a parallel backup.</p></li>
|
| <li><p>Use the dropdown listbox next to <em>Rolename</em> to specify the role that owns the
|
| backup.</p></li>
|
| </ul>
|
| <p>Click the <em>Data Options</em> tab to continue. Use the fields in the <em>Data Options</em>
|
| tab to provide options related to data or pgAdmin objects that correspond to <em>pg_dump</em>.</p>
|
| <img alt="Sections option on backup dialog" class="align-center" src="_images/backup_sections.png" />
|
| <ul>
|
| <li><p>Move switches in the <strong>Sections</strong> field box to select a portion of the object
|
| that will be backed up.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Pre-data</em> towards right position to include all
|
| data definition items not included in the data or post-data item lists.</p></li>
|
| <li><p>Move the switch next to <em>Data</em> towards right position to backup actual table
|
| data, large-object contents, and sequence values.</p></li>
|
| <li><p>Move the switch next to <em>Post-data</em> towards right position to include
|
| definitions of indexes, triggers, rules, and constraints other than
|
| validated check constraints.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| </ul>
|
| <img alt="Type of objects option on backup dialog" class="align-center" src="_images/backup_objects.png" />
|
| <ul>
|
| <li><p>Move switches in the <strong>Type of objects</strong> field box to specify details about
|
| the type of objects that will be backed up.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Only data</em> towards right position to limit the back
|
| up to data.</p></li>
|
| <li><p>Move the switch next to <em>Only schemas</em> to limit the back up to schema-level
|
| database objects.</p></li>
|
| <li><p>Move the switch next to <em>Blobs</em> towards left position to exclude large
|
| objects in the backup.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| </ul>
|
| <img alt="Do not save option on backup dialog" class="align-center" src="_images/backup_do_not_save.png" />
|
| <ul>
|
| <li><p>Move switches in the <strong>Do not save</strong> field box to select the objects that will
|
| not be included in the backup.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Owner</em> towards right position to exclude commands
|
| that set object ownership.</p></li>
|
| <li><p>Move the switch next to <em>Privileges</em> towards right position to exclude
|
| commands that create access privileges.</p></li>
|
| <li><p>Move the switch next to <em>Tablespaces</em> towards right position to exclude
|
| tablespaces.</p></li>
|
| <li><p>Move the switch next to <em>Unlogged table data</em> towards right position to
|
| exclude the contents of unlogged tables.</p></li>
|
| <li><p>Move the switch next to <em>Comments</em> towards right position to exclude
|
| commands that set the comments. <strong>Note:</strong> This option is visible only for
|
| database server greater than or equal to 11.</p></li>
|
| <li><p>Move the switch next to <em>Publications</em> towards right position to exclude
|
| publications.</p></li>
|
| <li><p>Move the switch next to <em>Subscriptions</em> towards right position to exclude
|
| subscriptions.</p></li>
|
| <li><p>Move the switch next to <em>Security labels</em> towards right position to exclude
|
| Security labels.</p></li>
|
| <li><p>Move the switch next to <em>Toast compressions</em> towards right position to exclude
|
| Toast compressions. <strong>Note:</strong> This option is visible only for
|
| database server greater than or equal to 14.</p></li>
|
| <li><p>Move the switch next to <em>Table access methods</em> towards right position to exclude
|
| Table access methods. <strong>Note:</strong> This option is visible only for
|
| database server greater than or equal to 15.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| </ul>
|
| <img alt="Queries option on backup dialog" class="align-center" src="_images/backup_queries.png" />
|
| <p>Click the <em>Query Options</em> tab to continue. Use these additional fields to specify
|
| the type of statements that should be included in the backup.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Use INSERT commands</em> towards right 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.</p></li>
|
| <li><p>Use the <em>Maximum rows per INSERT command</em> field to controls the maximum
|
| number of rows per INSERT command. <strong>Note:</strong> This option is visible only for
|
| database server greater than or equal to 12.</p></li>
|
| <li><p>Move the switch next to <em>On conflict do nothing to INSERT command</em> towards
|
| right position to add ON CONFLICT DO NOTHING to INSERT command.
|
| This option is not valid unless <em>Use INSERT commands</em>, <em>Use Column INSERTS</em>
|
| or <em>Maximum rows per INSERT command</em> is also specified.
|
| <strong>Note:</strong> This option is visible only for database server greater than or
|
| equal to 12.</p></li>
|
| <li><p>Move the switch next to <em>Include CREATE DATABASE statement</em> towards right
|
| position to include a command in the backup that creates a new database
|
| when restoring the backup.</p></li>
|
| <li><p>Move the switch next to <em>Include DROP DATABASE statement</em> towards right
|
| 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.</p></li>
|
| <li><p>Move the switch next to <em>Include IF EXISTS clause</em> towards right
|
| position to add an IF EXISTS clause to drop databases and other objects.
|
| This option is not valid unless <em>Include DROP DATABASE statement</em> is also set.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| <img alt="Backup dialog tables section" class="align-center" src="_images/backup_table.png" />
|
| <p>Click the <em>Table Options</em> tab to continue. Use the fields in the <em>Table Options</em>
|
| tab related to tables that should be included in the backup.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Use Column INSERTS</em> towards right 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.</p></li>
|
| <li><p>Move the switch next to <em>Load via partition root</em> towards right position,
|
| so when dumping a COPY or INSERT statement for a partitioned table, target
|
| the root of the partitioning hierarchy which contains it rather than the
|
| partition itself. <strong>Note:</strong> This option is visible only for database server
|
| greater than or equal to 11.</p></li>
|
| <li><p>Move the switch next to <em>Enable row security</em> towards right position to
|
| set row_security to on instead, allowing the user to dump the parts of the
|
| contents of the table that they have access to. This option is relevant
|
| only when dumping the contents of a table which has row security.</p></li>
|
| <li><p>Use the <em>Include table(s) and Children</em> field to dump the tables and any partitions
|
| or inheritance child tables of the tables matching the pattern.
|
| <strong>Note:</strong> This option is visible only for database server greater than or
|
| equal to 16.</p></li>
|
| <li><p>The Exclude patterns field is utilized to exclude patterns in the following manner:</p></li>
|
| <li><p>Use the <em>Table(s)</em> field to not dump the tables matching the
|
| pattern. Multiple patterns can be given separated by space.</p></li>
|
| <li><p>Use the <em>Table(s) data</em> field to not dump data for any tables
|
| matching the pattern. Multiple patterns can be given separated by
|
| spaces.</p></li>
|
| <li><p>Use the <em>Table(s) and children</em> field to not dump the tables and any
|
| partitions or inheritance child tables of the tables matching the pattern.
|
| <strong>Note:</strong> This option is visible only for database server greater than or
|
| equal to 16.</p></li>
|
| <li><p>Use the <em>Table(s) data and children</em> field to not dump data for the
|
| tables and any partitions or inheritance child tables of the tables matching
|
| the table pattern. <strong>Note:</strong> This option is visible only for database server
|
| greater than or equal to 16.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| <p>Click the <em>Options</em> tab to continue. Use the fields in the <em>Options</em>
|
| tab to provide other backup options.</p>
|
| <img alt="Disable option on backup dialog" class="align-center" src="_images/backup_disable.png" />
|
| <ul>
|
| <li><p>Move switches in the <strong>Disable</strong> field box to specify the type of statements
|
| that should be excluded from the backup.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Triggers</em> (active when creating a data-only backup)
|
| towards right position to include commands that will disable triggers on the
|
| target table while the data is being loaded.</p></li>
|
| <li><p>Move the switch next to <em>$ quoting</em> towards right position to enable dollar
|
| quoting within function bodies; if disabled, the function body will be
|
| quoted using SQL standard string syntax.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| </ul>
|
| <img alt="Miscellaneous option on backup dialog" class="align-center" src="_images/backup_miscellaneous.png" />
|
| <ul>
|
| <li><p>Move switches in the <strong>Miscellaneous</strong> field box to specify miscellaneous
|
| backup options.</p>
|
| <blockquote>
|
| <div><ul class="simple">
|
| <li><p>Move the switch next to <em>Verbose messages</em> towards left position to instruct
|
| <em>pg_dump</em> to exclude verbose messages.</p></li>
|
| <li><p>Move the switch next to <em>Force double quotes on identifiers</em> towards right
|
| position to force the quoting of all identifiers.</p></li>
|
| <li><p>Move the switch next to <em>Use SET SESSION AUTHORIZATION</em> towards right
|
| position to include a statement that will use a SET SESSION AUTHORIZATION
|
| command to determine object ownership (instead of an ALTER OWNER command).</p></li>
|
| <li><p>Use the <em>Exclude schema</em> field to not dump schemas whose name matches
|
| pattern.</p></li>
|
| <li><p>Use the <em>Extra float digits</em> field to use the specified value when dumping
|
| floating-point data, instead of the maximum available precision.</p></li>
|
| <li><p>Use the <em>Lock wait timeout</em> field to do not wait forever to acquire shared
|
| table locks at the beginning of the dump. Instead, fail if unable to lock a
|
| table within the specified timeout.</p></li>
|
| </ul>
|
| </div></blockquote>
|
| </li>
|
| </ul>
|
| <p>Click the <em>Objects</em> tab to continue.</p>
|
| <img alt="Select objects in backup dialog" class="align-center" src="_images/backup_object_selection.png" />
|
| <ul class="simple">
|
| <li><dl class="simple">
|
| <dt>Select the objects from tree to take backup of selected objects only.</dt><dd><ul>
|
| <li><p>If Schema is selected then it will take the backup of that selected schema only.</p></li>
|
| <li><p>If any Table, View, Materialized View, Sequences, or Foreign Table is selected then it will take the backup of those selected objects.</p></li>
|
| </ul>
|
| </dd>
|
| </dl>
|
| </li>
|
| </ul>
|
| <p>When you’ve specified the details that will be incorporated into the pg_dump
|
| command:</p>
|
| <ul class="simple">
|
| <li><p>Click the <em>Backup</em> button to build and execute a command that builds a backup
|
| based on your selections on the <em>Backup</em> dialog.</p></li>
|
| <li><p>Click the <em>Cancel</em> button to exit without saving work.</p></li>
|
| </ul>
|
| <p>pgAdmin will run the backup process in background. You can view all the background
|
| process with there running status and logs on the <a class="reference internal" href="processes.html#processes"><span class="std std-ref">Processes</span></a>
|
| tab</p>
|
| </section>
|
|
|
|
|
| <div class="clearer"></div>
|
| </div>
|
| </div>
|
| </div>
|
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| <div class="sphinxsidebarwrapper">
|
| <h3><a href="index.html">Table of Contents</a></h3>
|
| <ul class="current">
|
| <li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="external_database.html">External database for pgAdmin user settings</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="connecting.html">Connecting To A Server</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="managing_cluster_objects.html">Managing Cluster Objects</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="managing_database_objects.html">Managing Database Objects</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="modifying_tables.html">Creating or Modifying a Table</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="management_basics.html">Management Basics</a></li>
|
| <li class="toctree-l1 current"><a class="reference internal" href="backup_and_restore.html">Backup and Restore</a><ul class="current">
|
| <li class="toctree-l2 current"><a class="current reference internal" href="#">Backup Dialog</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="backup_globals_dialog.html">Backup Globals Dialog</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="backup_server_dialog.html">Backup Server Dialog</a></li>
|
| <li class="toctree-l2"><a class="reference internal" href="restore_dialog.html">Restore Dialog</a></li>
|
| </ul>
|
| </li>
|
| <li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="processes.html">Processes</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="pgagent.html">pgAgent</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="contributions.html">pgAdmin Project Contributions</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release Notes</a></li>
|
| <li class="toctree-l1"><a class="reference internal" href="licence.html">Licence</a></li>
|
| </ul>
|
|
|
| <search id="searchbox" style="display: none" role="search">
|
| <h3 id="searchlabel">Quick search</h3>
|
| <div class="searchformwrapper">
|
| <form class="search" action="search.html" method="get">
|
| <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| <input type="submit" value="Go" />
|
| </form>
|
| </div>
|
| </search>
|
| <script>document.getElementById('searchbox').style.display = "block"</script>
|
| </div>
|
| <div id="sidebarbutton" title="Collapse sidebar">
|
| <span>«</span>
|
| </div>
|
|
|
| </div>
|
| <div class="clearer"></div>
|
| </div>
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <h3>Navigation</h3>
|
| <ul>
|
| <li class="right" style="margin-right: 10px">
|
| <a href="genindex.html" title="General Index"
|
| >index</a></li>
|
| <li class="right" >
|
| <a href="backup_globals_dialog.html" title="Backup Globals Dialog"
|
| >next</a> |</li>
|
| <li class="right" >
|
| <a href="backup_and_restore.html" title="Backup and Restore"
|
| >previous</a> |</li>
|
| <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
|
| <li class="nav-item nav-item-1"><a href="backup_and_restore.html" >Backup and Restore</a> »</li>
|
| <li class="nav-item nav-item-this"><a href="">Backup Dialog</a></li>
|
| </ul>
|
| </div>
|
| <div class="footer" role="contentinfo">
|
| <div class="related" role="navigation" aria-label="related navigation">
|
| <ul>
|
| <li class="left" style="margin-left: 10px">© Copyright (C) 2013 - 2024, The pgAdmin Development Team.</li>
|
| <li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
|
| <li class="right" ><a href="backup_globals_dialog.html" title="Backup Globals Dialog" accesskey="N">next</a> |</li>
|
| <li class="right" ><a href="backup_and_restore.html" title="Backup and Restore" accesskey="P">previous</a> |</li>
|
| </ul>
|
| </div>
|
| </div>
|
| </body>
|
| </html> |