codekingpro/portable-devtools
114k
1
2
3<!DOCTYPE html>
4
5<html lang="en" data-content_root="./">
6 <head>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
9
10 <title>Restore Dialog — pgAdmin 4 8.6 documentation</title>
11 <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
12 <link rel="stylesheet" type="text/css" href="_static/style.css?v=d36593c3" />
13
14 <script src="_static/documentation_options.js?v=d4c83366"></script>
15 <script src="_static/doctools.js?v=9a2dae69"></script>
16 <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
17
18 <script src="_static/sidebar.js"></script>
19
20 <link rel="index" title="Index" href="genindex.html" />
21 <link rel="search" title="Search" href="search.html" />
22 <link rel="next" title="Developer Tools" href="developer_tools.html" />
23 <link rel="prev" title="Backup Server Dialog" href="backup_server_dialog.html" />
24 </head><body>
25 <div class="related" role="navigation" aria-label="related navigation">
26 <h3>Navigation</h3>
27 <ul>
28 <li class="right" style="margin-right: 10px">
29 <a href="genindex.html" title="General Index"
30 accesskey="I">index</a></li>
31 <li class="right" >
32 <a href="developer_tools.html" title="Developer Tools"
33 accesskey="N">next</a> |</li>
34 <li class="right" >
35 <a href="backup_server_dialog.html" title="Backup Server Dialog"
36 accesskey="P">previous</a> |</li>
37 <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
38 <li class="nav-item nav-item-1"><a href="backup_and_restore.html" accesskey="U">Backup and Restore</a> »</li>
39 <li class="nav-item nav-item-this"><a href="">Restore Dialog</a></li>
40 </ul>
41 </div>
42
43 <div class="document">
44 <div class="documentwrapper">
45 <div class="bodywrapper">
46 <div class="body" role="main">
47
48 <section id="restore-dialog">
49<span id="id1"></span><h1><span class="target" id="index-0"></span>Restore Dialog<a class="headerlink" href="#restore-dialog" title="Link to this heading">¶</a></h1>
50<p>The <em>Restore</em> dialog provides an easy way to use a Custom, tar, or Directory
51format backup taken with the pgAdmin <em>Backup</em> dialog to recreate a database or
52database object. The <em>Backup</em> dialog invokes options of the pg_dump client
53utility; the <em>Restore</em> dialog invokes options of the pg_restore client utility.</p>
54<p>You can use the <em>Query Tool</em> to play back the script created during a plain-text
55backup made with the <em>Backup</em> dialog. For more information about backing up or
56restoring, please refer to the documentation for
57<a class="reference external" href="https://www.postgresql.org/docs/current/app-pgdump.html">pg_dump</a> or
58<a class="reference external" href="https://www.postgresql.org/docs/current/app-pgrestore.html">pg_restore</a>.</p>
59<img alt="Restore dialog general tab" class="align-center" src="_images/restore_general.png" />
60<p>Use the fields on the <em>General</em> tab to specify general information about the
61restore process:</p>
62<ul>
63<li><p>Use the drop-down listbox in the <em>Format</em> field to select the format of your
64backup file.</p>
65<blockquote>
66<div><ul class="simple">
67<li><p>Select <em>Custom or tar</em> to restore from a custom archive file to create a
68copy of the backed-up object.</p></li>
69<li><p>Select <em>Directory</em> to restore from a compressed directory-format archive.</p></li>
70</ul>
71</div></blockquote>
72</li>
73<li><p>Enter the complete path to the backup file in the <em>Filename</em> field.
74Optionally, select the <em>Browse</em> icon (ellipsis) to the right to navigate
75into a directory and select the file that contains the archive.</p></li>
76<li><p>Use the <em>Number of Jobs</em> field to specify if pg_restore should use multiple
77(concurrent) jobs to process the restore. Each job uses a separate connection
78to the server.</p></li>
79<li><p>Use the drop-down listbox next to <em>Rolename</em> to specify the role that will be
80used to authenticate with the server during the restore process.</p></li>
81</ul>
82<p>Click the <em>Data Options</em> tab to continue. Use the fields in the <em>Data Options</em>
83tab to provide options related to data or pgAdmin objects that correspond to <em>pg_restore</em>.</p>
84<img alt="Restore dialog options section" class="align-center" src="_images/restore_sections.png" />
85<ul>
86<li><p>Move switches in the <strong>Sections</strong> field box to specify the content that will be
87restored:</p>
88<blockquote>
89<div><ul class="simple">
90<li><p>Move the switch next to <em>Pre-data</em> towards right position to restore all
91data definition items not included in the data or post-data item lists.</p></li>
92<li><p>Move the switch next to <em>Data</em> towards right position to restore actual
93table data, large-object contents, and sequence values.</p></li>
94<li><p>Move the switch next to <em>Post-data</em> towards right position position to restore
95definitions of indexes, triggers, rules, and constraints (other than
96validated check constraints).</p></li>
97</ul>
98</div></blockquote>
99</li>
100</ul>
101<img alt="Restore dialog sections section" class="align-center" src="_images/restore_objects.png" />
102<ul>
103<li><p>Move switches in the <strong>Type of objects</strong> field box to specify the objects that
104will be restored:</p>
105<blockquote>
106<div><ul class="simple">
107<li><p>Move the switch next to <em>Only data</em> towards right position to limit the
108restoration to data.</p></li>
109<li><p>Move the switch next to <em>Only schema</em> to limit the restoration to
110schema-level database objects.</p></li>
111</ul>
112</div></blockquote>
113</li>
114</ul>
115<img alt="Restore dialog do not save section" class="align-center" src="_images/restore_do_not_save.png" />
116<ul>
117<li><p>Move switches in the <strong>Do not save</strong> box to specify which objects will not
118be restored:</p>
119<blockquote>
120<div><ul class="simple">
121<li><p>Move the switch next to <em>Owner</em> towards right position to exclude commands
122that set object ownership.</p></li>
123<li><p>Move the switch next to <em>Privileges</em> towards right position to exclude
124commands that create access privileges.</p></li>
125<li><p>Move the switch next to <em>Tablespaces</em> towards right position to exclude
126tablespaces.</p></li>
127<li><p>Move the switch next to <em>Comments</em> towards right position to exclude
128commands that set the comments. <strong>Note:</strong> This option is visible only for
129database server greater than or equal to 11.</p></li>
130<li><p>Move the switch next to <em>Publications</em> towards right position to exclude
131publications.</p></li>
132<li><p>Move the switch next to <em>Subscriptions</em> towards right position to exclude
133subscriptions.</p></li>
134<li><p>Move the switch next to <em>Security labels</em> towards right position to exclude
135Security labels.</p></li>
136<li><p>Move the switch next to <em>Table access methods</em> towards right position to exclude
137Table access methods. <strong>Note:</strong> This option is visible only for
138database server greater than or equal to 15.</p></li>
139</ul>
140</div></blockquote>
141</li>
142</ul>
143<img alt="Restore dialog queries section" class="align-center" src="_images/restore_queries.png" />
144<p>Click the <em>Query Options</em> tab to continue. Use these additional fields to specify
145the type of statements that should be included in the restore:</p>
146<blockquote>
147<div><ul class="simple">
148<li><p>Move the switch next to <em>Include CREATE DATABASE statement</em> towards right position
149to include a command that creates a new database before performing the restore.</p></li>
150<li><p>Move the switch next to <em>Clean before restore</em> towards right position to
151drop each existing database object (and data) before restoring.</p></li>
152<li><p>Move the switch next to <em>Include IF EXISTS clause</em> towards right
153position to add an IF EXISTS clause to drop databases and other objects.
154This option is not valid unless <em>Clean before restore</em> is also set.</p></li>
155<li><p>Move the switch next to <em>Single transaction</em> towards right position to
156execute the restore as a single transaction (that is, wrap the emitted
157commands in <em>BEGIN/COMMIT</em>). This ensures that either all the commands
158complete successfully, or no changes are applied. This option implies
159<em>–exit-on-error</em>.</p></li>
160</ul>
161</div></blockquote>
162<img alt="Restore dialog tables section" class="align-center" src="_images/restore_table.png" />
163<p>Click the <em>Table Options</em> tab to continue. Use the fields in the <em>Table Options</em>
164tab related to tables that should be included in the backup.</p>
165<blockquote>
166<div><ul class="simple">
167<li><p>Move the switch next to <em>Enable row security</em> towards right position to
168set row_security to on instead, allowing the user to dump the parts of the
169contents of the table that they have access to. This option is relevant
170only when dumping the contents of a table which has row security.</p></li>
171<li><p>Move the switch next to <em>No data for failed tables</em> towards right position
172to ignore data that fails a trigger.</p></li>
173</ul>
174</div></blockquote>
175<p>Click the <em>Options</em> tab to continue. Use the fields in the <em>Options</em>
176tab to provide other restore options.</p>
177<img alt="Restore dialog miscellaneous section" class="align-center" src="_images/restore_miscellaneous.png" />
178<ul>
179<li><p>Move switches in the <strong>Disable</strong> box to specify the type of statements that
180should be excluded from the restore:</p>
181<blockquote>
182<div><ul class="simple">
183<li><p>Move the switch next to <em>Triggers</em> (active when creating a data-only
184restore) towards right position to include commands that will disable
185triggers on the target table while the data is being loaded.</p></li>
186</ul>
187</div></blockquote>
188</li>
189<li><p>Move switches in the <strong>Miscellaneous/Behavior</strong> box to specify
190miscellaneous restore options:</p>
191<blockquote>
192<div><ul class="simple">
193<li><p>Move the switch next to <em>Verbose messages</em> towards left to instruct
194<em>pg_restore</em> to exclude verbose messages.</p></li>
195<li><p>Move the switch next to <em>Use SET SESSION AUTHORIZATION</em> towards right position
196to include a statement that will use a SET SESSION AUTHORIZATION
197command to determine object ownership (instead of an ALTER OWNER command).</p></li>
198<li><p>Move the switch next to <em>Exit on error</em> towards right position to instruct
199<em>pg_restore</em> to exit restore if there is an error in sending SQL commands.
200The default is to continue and to display a count of errors at the end of
201the restore.</p></li>
202<li><p>Use the <em>Exclude schema</em> field to not dump schemas whose name matches
203pattern.</p></li>
204</ul>
205</div></blockquote>
206</li>
207</ul>
208<p>When you’ve specified the details that will be incorporated into the pg_restore
209command, click the <em>Restore</em> button to start the process, or click the <em>Cancel</em>
210button to exit without saving your work. A popup will confirm if the restore is
211successful.</p>
212<p>pgAdmin will run the restore process in background. You can view all the background
213process with there running status and logs on the <a class="reference internal" href="processes.html#processes"><span class="std std-ref">Processes</span></a>
214tab</p>
215</section>
216
217
218 <div class="clearer"></div>
219 </div>
220 </div>
221 </div>
222 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
223 <div class="sphinxsidebarwrapper">
224<h3><a href="index.html">Table of Contents</a></h3>
225<ul class="current">
226<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
227<li class="toctree-l1"><a class="reference internal" href="external_database.html">External database for pgAdmin user settings</a></li>
228<li class="toctree-l1"><a class="reference internal" href="connecting.html">Connecting To A Server</a></li>
229<li class="toctree-l1"><a class="reference internal" href="managing_cluster_objects.html">Managing Cluster Objects</a></li>
230<li class="toctree-l1"><a class="reference internal" href="managing_database_objects.html">Managing Database Objects</a></li>
231<li class="toctree-l1"><a class="reference internal" href="modifying_tables.html">Creating or Modifying a Table</a></li>
232<li class="toctree-l1"><a class="reference internal" href="management_basics.html">Management Basics</a></li>
233<li class="toctree-l1 current"><a class="reference internal" href="backup_and_restore.html">Backup and Restore</a><ul class="current">
234<li class="toctree-l2"><a class="reference internal" href="backup_dialog.html">Backup Dialog</a></li>
235<li class="toctree-l2"><a class="reference internal" href="backup_globals_dialog.html">Backup Globals Dialog</a></li>
236<li class="toctree-l2"><a class="reference internal" href="backup_server_dialog.html">Backup Server Dialog</a></li>
237<li class="toctree-l2 current"><a class="current reference internal" href="#">Restore Dialog</a></li>
238</ul>
239</li>
240<li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
241<li class="toctree-l1"><a class="reference internal" href="processes.html">Processes</a></li>
242<li class="toctree-l1"><a class="reference internal" href="pgagent.html">pgAgent</a></li>
243<li class="toctree-l1"><a class="reference internal" href="contributions.html">pgAdmin Project Contributions</a></li>
244<li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release Notes</a></li>
245<li class="toctree-l1"><a class="reference internal" href="licence.html">Licence</a></li>
246</ul>
247
248<search id="searchbox" style="display: none" role="search">
249 <h3 id="searchlabel">Quick search</h3>
250 <div class="searchformwrapper">
251 <form class="search" action="search.html" method="get">
252 <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
253 <input type="submit" value="Go" />
254 </form>
255 </div>
256</search>
257<script>document.getElementById('searchbox').style.display = "block"</script>
258 </div>
259<div id="sidebarbutton" title="Collapse sidebar">
260<span>«</span>
261</div>
262
263 </div>
264 <div class="clearer"></div>
265 </div>
266 <div class="related" role="navigation" aria-label="related navigation">
267 <h3>Navigation</h3>
268 <ul>
269 <li class="right" style="margin-right: 10px">
270 <a href="genindex.html" title="General Index"
271 >index</a></li>
272 <li class="right" >
273 <a href="developer_tools.html" title="Developer Tools"
274 >next</a> |</li>
275 <li class="right" >
276 <a href="backup_server_dialog.html" title="Backup Server Dialog"
277 >previous</a> |</li>
278 <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
279 <li class="nav-item nav-item-1"><a href="backup_and_restore.html" >Backup and Restore</a> »</li>
280 <li class="nav-item nav-item-this"><a href="">Restore Dialog</a></li>
281 </ul>
282 </div>
283 <div class="footer" role="contentinfo">
284 <div class="related" role="navigation" aria-label="related navigation">
285 <ul>
286 <li class="left" style="margin-left: 10px">© Copyright (C) 2013 - 2024, The pgAdmin Development Team.</li>
287 <li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
288 <li class="right" ><a href="developer_tools.html" title="Developer Tools" accesskey="N">next</a> |</li>
289 <li class="right" ><a href="backup_server_dialog.html" title="Backup Server Dialog" accesskey="P">previous</a> |</li>
290 </ul>
291 </div>
292 </div>
293 </body>
294</html>