forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
97 lines
49 KiB
HTML
97 lines
49 KiB
HTML
<a name="EN-US_TOPIC_0000001148856437"></a><a name="EN-US_TOPIC_0000001148856437"></a>
|
|
|
|
<h1 class="topictitle1">gs_dumpall</h1>
|
|
<div id="body32001227"><div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_sbbf35e8ce29847b4a814faf3f6638393"><h4 class="sectiontitle">Background</h4><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_en-us_topic_0059778372_p95456188347"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706163441">gs_dumpall</strong> is a tool provided by <span id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_text1106431371">GaussDB(DWS)</span> to export all database information, including the data of the default <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706163520">postgres</strong> database, data of user-specified databases, and global objects of all databases in a cluster.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_p203823882615">When <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b1421115113168">gs_dumpall</strong> is used to export data, other users still can access the databases (readable or writable) in a cluster.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_p025617309813"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b115539267169">gs_dumpall</strong> can export complete, consistent data. For example, if <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b1187055391614">gs_dumpall</strong> is started to export all databases from a cluster at T1, data of the databases at that time point will be exported, and modifications on the databases after that time point will not be exported.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_p1737613161072">To export all databases in a cluster:</p>
|
|
<ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ul1097012242717"><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_li14970152212273"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706163956">gs_dumpall</strong> exports all global objects, including information about database users and groups, tablespaces, and attributes (for example, global access permissions).</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_li697017222271"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b94106812716">gs_dumpall</strong> invokes <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b18659613102716">gs_dump</strong> to export SQL scripts, which contain all the SQL statements required for restoring databases.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_p1063517497408">Both of the preceding exported files are plain-text SQL scripts. Use <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b18614122354910">gsql</strong> to execute them to restore databases.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s7ed9bdc7efd0420b895dcff18e20ce41"><h4 class="sectiontitle">Precautions</h4><ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_u3e901a217e08461f98d620ea06f9f7d5"><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l3e52ce1ca9614d56819511f240bbe3ac">Do not modify an exported file or its content. Otherwise, restoration may fail.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l71253b7c9914417eb99ab6522b9a2921">To ensure the data consistency and integrity, <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270617727">gs_dumpall</strong> sets a share lock for a table to be dumped. If a share lock has been set for the table in other transactions, <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270617750">gs_dumpall</strong> locks the table after it is released. If the table cannot be locked in the specified time, the dump will fail. You can customize the timeout duration to wait for lock release by specifying the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706103121">--lock-wait-timeout</strong> parameter.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_li86641432192912">During an export, <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b516335118119">gs_dumpall</strong> reads all tables in a database. Therefore, you need to connect to the database as a cluster administrator to export a complete file. When using <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b10561153653110">gsql</strong> to execute the SQL scripts, you need the administrator permissions so that you can add users and user groups, and create databases.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_sd42b4b1a346446f19b202a869efcbe5d"><h4 class="sectiontitle">Syntax</h4><pre class="screen" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s6a1a989fca824a1484c85a6f2d5d5a43"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ac2681a97ec7143bb8562c0f4fdd522d8">gs_dumpall</strong> [OPTION]...</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s736cc534e64142bc9fff3262e692dc40"><h4 class="sectiontitle">Parameter Description</h4><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ac7530712bf2748aaab24b75629a45c67">Common parameters:</p>
|
|
<ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_uc01028fe5af44aa6abca94d77d29a5ff"><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3044e942f35446e9ecb25213855e0da">-f, --filename=FILENAME<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a735323f0d45d46878d13c2f65ae7feac"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3044e942f35446e9ecb25213855e0da"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3044e942f35446e9ecb25213855e0da"></a>Sends the output to the specified file. If this parameter is omitted, the standard output is used.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leb0785fd5e694f1da986371ffda83eae">-v, --verbose<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a8455475a1c584f41acf8b78f10a3021c"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leb0785fd5e694f1da986371ffda83eae"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_leb0785fd5e694f1da986371ffda83eae"></a>Specifies the verbose mode. This will cause <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706163944">gs_dumpall</strong> to output detailed object comments and start/stop times to the dump file, and progress messages to standard error.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leac126664844426c98b10886bb95ff09">-V, --version<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a60b931822f3d45b8bf86bb1e30b5f235"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leac126664844426c98b10886bb95ff09"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_leac126664844426c98b10886bb95ff09"></a>Prints the version information for <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706164158">gs_dumpall</strong> and exits.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4b5c42f185a9469cb733f6928b194b70">--lock-wait-timeout=TIMEOUT<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a2e24ffee750743a288f6c90b4b0755ef"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4b5c42f185a9469cb733f6928b194b70"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4b5c42f185a9469cb733f6928b194b70"></a>Do not keep waiting to obtain shared table locks at the beginning of the dump. Consider it as failed if you are unable to lock a table within the specified time. The timeout duration can be specified in any of the formats accepted by <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270616436">SET statement_timeout</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le1037402e6744b5faadb9af27c0d6963">-?, --help<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a4a945b70328b4dae84d7efe76c60765f"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le1037402e6744b5faadb9af27c0d6963"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_le1037402e6744b5faadb9af27c0d6963"></a>Shows help about the command line parameters for <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706164351">gs_dumpall</strong> and exits.</p>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a338c07ce973b4e4fb8f51d0ff038cc74">Dump parameters:</p>
|
|
<ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_u72f55b9819914e5cb103451c0fa65565"><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7b991930b744dfa98776ae18ebfb7ea">-a, --data-only<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a7f7e8cf62c1049d8973bc49e0220af18"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7b991930b744dfa98776ae18ebfb7ea"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7b991930b744dfa98776ae18ebfb7ea"></a>Dumps only the data, not the schema (data definition).</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2b2d0d2c580d492087745c7ed02537ed">-c, --clean<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a674aef8a8fae451b9f0793d9b2f1976d"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2b2d0d2c580d492087745c7ed02537ed"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2b2d0d2c580d492087745c7ed02537ed"></a>Runs SQL statements to delete databases before rebuilding them. Statements for dumping roles and tablespaces are added.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779ff307c5d7471db2997ebaea67e914">-g, --globals-only<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_af6b0a15386b14e35bc5846989090fc42"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779ff307c5d7471db2997ebaea67e914"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779ff307c5d7471db2997ebaea67e914"></a>Dumps only global objects (roles and tablespaces) but no databases.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l096c7bd2324d4cbda41189642ca4138c">-o, --oids<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ae52f831ae9db4ebbbcff4fbcb6beb633"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l096c7bd2324d4cbda41189642ca4138c"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l096c7bd2324d4cbda41189642ca4138c"></a>Dumps object identifiers (OIDs) as parts of the data in each table. Use this parameter if your application references the OID columns in some way (for example, in a foreign key constraint). If the preceding situation does not occur, do not use this parameter.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779cd75cbba94d938afed2b62e1dba76">-O, --no-owner<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a93c65a095ea043b1a2f0ff972f828ab7"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779cd75cbba94d938afed2b62e1dba76"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l779cd75cbba94d938afed2b62e1dba76"></a>Do not output commands to set ownership of objects to match the original database. By default, <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706164754">gs_dumpall</strong> issues the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270616400">ALTER OWNER</strong> or <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270616405">SET SESSION AUTHORIZATION</strong> statement to set ownership of created schema elements. These statements will fail when the script is running unless it is started by a system administrator (or the same user that owns all of the objects in the script). To make a script that can be stored by any user and give the user ownership of all objects, specify <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b899631211249">-O</strong>.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lb6c588260ea24403b34cb4981f8b523a">-r, --roles-only<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a8e64efdddd394091b9311c886ad995bc"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lb6c588260ea24403b34cb4981f8b523a"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lb6c588260ea24403b34cb4981f8b523a"></a>Dumps only roles but not databases or tablespaces.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ldb3fe3e12312403c8a43baf2a5718c39">-s, --schema-only<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a2fac11ade14d43e58917d43833180143"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ldb3fe3e12312403c8a43baf2a5718c39"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_ldb3fe3e12312403c8a43baf2a5718c39"></a>Dumps only the object definition (schema) but not data.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lcca6430902994bd4afc4d4acb04440f1">-S, --sysadmin=NAME<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a4a45fa6f5a774e83b9adebbe6cc56bf6"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lcca6430902994bd4afc4d4acb04440f1"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lcca6430902994bd4afc4d4acb04440f1"></a>Name of the system administrator during the dump.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l492cb6e1020f4f2b8c5ed40df6761977">-t, --tablespaces-only<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a25914c002d0f4832b647fc4ec028aaa5"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l492cb6e1020f4f2b8c5ed40df6761977"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l492cb6e1020f4f2b8c5ed40df6761977"></a>Dumps only tablespaces but not databases or roles.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lea50527d6ab54d3485c2bc19730db908">-x, --no-privileges<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a6a785aed8adf4993a4266d20a7bc2964"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lea50527d6ab54d3485c2bc19730db908"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lea50527d6ab54d3485c2bc19730db908"></a>Prevents the dumping of access permissions (grant/revoke commands).</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3a0c28a895046c0b59d7f970e9bd809">--column-inserts|--attribute-inserts<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_acc011fc0687e4f65be27b458bf250e0c"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3a0c28a895046c0b59d7f970e9bd809"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc3a0c28a895046c0b59d7f970e9bd809"></a>Exports data by running the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b13720130243">INSERT</strong> command with explicit column names {INSERT INTO table (column, ...) VALUES ...}. This will cause a slow restoration. However, since this option generates an independent command for each row, an error in reloading a row causes only the loss of the row rather than the entire table content.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf48a7b4e08664adaa74f6caa0e67ab49">--disable-dollar-quoting<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a972ebe8ca1d7400f9e75b2a2aec48a18"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf48a7b4e08664adaa74f6caa0e67ab49"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf48a7b4e08664adaa74f6caa0e67ab49"></a>Disables the use of dollar sign ($) for function bodies, and forces them to be quoted using the SQL standard string syntax.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le50c1105cb004558941474ec469b515b">--disable-triggers<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a2d65f91985ac4050b62d2281e1886a30"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le50c1105cb004558941474ec469b515b"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_le50c1105cb004558941474ec469b515b"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l07d1eaad6a794a22b362b9bdce0715b3">--inserts<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a2e4d2cb3fa064d15a4e34fbdf2bae9db"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l07d1eaad6a794a22b362b9bdce0715b3"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l07d1eaad6a794a22b362b9bdce0715b3"></a>Dumps data when the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b813131362416">INSERT</strong> statement (rather than <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b161311318241">COPY</strong>) is issued. This will cause a slow restoration. The restoration may fail if you rearrange the column order. The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b11341311249">--column-inserts</strong> parameter is safer against column order changes, though even slower.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7797cb3694c944e8bcfef183f1754ce0">--no-security-labels<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ab71f8d1ca73742e48d86af157aade600"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7797cb3694c944e8bcfef183f1754ce0"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7797cb3694c944e8bcfef183f1754ce0"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7157d006f5f4aacbf11f11e0e9469de">--no-tablespaces<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a3e7c19f5847d44ea990c4267dc7d44fc"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7157d006f5f4aacbf11f11e0e9469de"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_le7157d006f5f4aacbf11f11e0e9469de"></a>Do not output statements to create tablespaces or select tablespaces for objects. All the objects will be created during the restoration process, no matter which tablespace is selected when using this option.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lbfeed7f7e69c4be998d84f62185ba7db">--no-unlogged-table-data<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aab409f302e7544909e95dec433e41669"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lbfeed7f7e69c4be998d84f62185ba7db"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lbfeed7f7e69c4be998d84f62185ba7db"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l630c5eb2222a4939b2166f4e8596706d">--quote-all-identifiers<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a677afba18dfa4fdf8a39edbdab328add"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l630c5eb2222a4939b2166f4e8596706d"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l630c5eb2222a4939b2166f4e8596706d"></a>Forcibly quotes all identifiers. This parameter is useful when you dump a database for migration to a later version, in which additional keywords may be introduced.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfe75e9cec0504aab94079a03b32fa401">--dont-overwrite-file<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a481ecd5e440241ba9ee6bdfc64c6543e"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfe75e9cec0504aab94079a03b32fa401"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfe75e9cec0504aab94079a03b32fa401"></a>Do not overwrite the current file.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfafbb1fe150d4717b0565320024deff9">--use-set-session-authorization<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aedf6d732627440818df62f08bf74ae50"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfafbb1fe150d4717b0565320024deff9"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lfafbb1fe150d4717b0565320024deff9"></a>Specifies that the standard SQL <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706102342">SET SESSION AUTHORIZATION</strong> command rather than <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706102357">ALTER OWNER</strong> is returned to ensure the object ownership. This makes dumping more standard. However, if a dump file contains objects that have historical problems, restoration may fail. A dump using <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b06076261165">SET SESSION AUTHORIZATION</strong> requires the system administrator rights, whereas <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b0607152617166">ALTER OWNER</strong> requires lower permissions.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leee29868f91a46f9a4a19f5527ac4398">--with-encryption=AES128<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ad6ff7df44fab48f29397127405d312f0"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_leee29868f91a46f9a4a19f5527ac4398"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_leee29868f91a46f9a4a19f5527ac4398"></a>Specifies that dumping data needs to be encrypted using AES128.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l6ee5437255e0462db5246ec39ac7de83">--with-key=KEY<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a1b26cfb189f84959aa266371941c3b77"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l6ee5437255e0462db5246ec39ac7de83"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l6ee5437255e0462db5246ec39ac7de83"></a>Specifies that the key length of AES128 must be 16 bytes.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l024e21f2516c4e72b8a45ccc91b883ce">--include-extensions<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a188314995c6e452ba27778718a18dc47"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l024e21f2516c4e72b8a45ccc91b883ce"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l024e21f2516c4e72b8a45ccc91b883ce"></a>Backs up all CREATE EXTENSION statements if the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b128161310245">include-extensions</strong> parameter is set.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_la0b9968fb9a74949ba8e5d91723f9838">--include-templatedb<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a8dff894c3ced40c08f2e3bfc5774c72d"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_la0b9968fb9a74949ba8e5d91723f9838"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_la0b9968fb9a74949ba8e5d91723f9838"></a>Includes template databases during the dump.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l8ad912f88acf4600b4f427e07e056099">--dump-nodes<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a9faad4cd19084f00be67959c22868119"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l8ad912f88acf4600b4f427e07e056099"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l8ad912f88acf4600b4f427e07e056099"></a>Includes nodes and Node Groups during the dump.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2568322a987e4cec9fd59e24912ef9a1">--include-nodes<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ab64ecdb1072d4b66a0a06430f9d770f5"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2568322a987e4cec9fd59e24912ef9a1"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l2568322a987e4cec9fd59e24912ef9a1"></a>Includes the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706162922">TO NODE</strong> statement in the dumped <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b10381013152411">CREATE TABLE</strong> statement.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7160f39629624f138d5dacd54ccc96c6">--include-buckets<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a237f1126358d4e89ac0b66bd7d304d79"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7160f39629624f138d5dacd54ccc96c6"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7160f39629624f138d5dacd54ccc96c6"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc43443ab0fdd49d1aa128de7bad5b884">--dump-wrm<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a01252ec85a1d4ab5b9ee3a76771873e8"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc43443ab0fdd49d1aa128de7bad5b884"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc43443ab0fdd49d1aa128de7bad5b884"></a>Includes workload resource manager (resource pool, load group, and load group mapping) during the dump.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l99a24c18da5c4fc6a721064fb462f89f">--binary-upgrade<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a3d4786c206e141c7b40fb86ad9ad8410"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l99a24c18da5c4fc6a721064fb462f89f"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l99a24c18da5c4fc6a721064fb462f89f"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l0a860e09da07487db388c8d645bdc896">--binary-upgrade-usermap="USER1=USER2"<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aca984ab69cfa40ec9bc95873d9a4ff24"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l0a860e09da07487db388c8d645bdc896"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l0a860e09da07487db388c8d645bdc896"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l841a2d1a4bee4930a54858fd599dbfdc">--tablespaces-postfix<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a78aeff1585b842008aabe8acc3f218ca"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l841a2d1a4bee4930a54858fd599dbfdc"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l841a2d1a4bee4930a54858fd599dbfdc"></a>Specifies a reserved port for function expansion. This parameter is not recommended.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc07f032f3ea14583a1d1544cbbb02201">--parallel-jobs<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a1b434c9c43fe4592b75862fdf3ba5154"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc07f032f3ea14583a1d1544cbbb02201"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc07f032f3ea14583a1d1544cbbb02201"></a>Specifies the number of concurrent backup processes. The value range is 1-1000.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="note" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_nd0b04dc04b484c0594f903b5ea9b1913"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_uaf5e146d95f9494584dfae0ed7702424"><li class="text" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l04450f3cc7b94656bb256c1fb2c7611f">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706114846">-g/--globals-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706114855">-r/--roles-only</strong> parameters do not coexist.</li><li class="text" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l428192b9087d4deba4c21e375dd25a97">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b894831999">-g/--globals-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b260145988">-t/--tablespaces-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l9b7c50cd7dac4404974300492b329882">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1143620325">-r/--roles-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b253433572">-t/--tablespaces-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ld238da8bdecb419da23766caa48e0ea4">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1497738736">-s/--schema-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b356132256">-a/--data-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l7a8392a0ca0542129f8f2ee5c45b4c29">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1269848262">-r/--roles-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1092528778">-a/--data-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lad032fd4a4a54bac866a652f4a2d5aa9">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1208226876">-t/--tablespaces-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1174339281">-a/--data-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4eda2c9d7844484eaea0ba7bc37fb32a">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1448688068">-g/--globals-only</strong> and <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1834349756">-a/--data-only</strong> parameters do not coexist.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lec48608a0dc24688baf30141c4653982"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706115436">--tablespaces-postfix</strong> must be used in conjunction with <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706115447">--binary-upgrade</strong>.</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lcdb1b2e8d4e54730837fbf1fa2f66300"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1289581697">--parallel-jobs</strong> must be used in conjunction with <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b205770885">-f/--file</strong>.</li></ul>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a17a323599f1943f2a13b210fcacec605">Connection parameters:</p>
|
|
<ul id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_u07b356c62bfd40eaa77631bed6cf738b"><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc204e4ed2bae42d38cadae88ddb8f0be">-h, --host<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a116cf4b82038499abc28c0076052e8fa"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc204e4ed2bae42d38cadae88ddb8f0be"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lc204e4ed2bae42d38cadae88ddb8f0be"></a>Specifies the host name. If the value begins with a slash (/), it is used as the directory for the UNIX domain socket. The default value is taken from the <em id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_i166981320240">PGHOST</em> environment variable. If it is not set, a UNIX domain socket connection is attempted.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a57b5d316b0e248ed8e03603b214a2e60">This parameter is used only for defining names of the hosts outside a cluster. The names of the hosts inside the cluster must be 127.0.0.1.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ac5ff9c72a69b4e5caf493ce2a2ed2872">Environment Variable: <em id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_i129153711172">PGHOST</em></p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4d6279a7f60b41f49328dd225afa93ab">-l, --database<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a18446c2f25e54ec390b37abeb2a319db"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4d6279a7f60b41f49328dd225afa93ab"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l4d6279a7f60b41f49328dd225afa93ab"></a>Specifies the name of the database connected to dump all objects and discover other databases to be dumped. If this parameter is not specified, the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b1198123414203">postgres</strong> database will be used. If the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b3778203842014">postgres</strong> database does not exist, <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b541994111201">template1</strong> will be used.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l21bc26ebc141423380eab98f1706e5cb">-p, --port<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aee091019181a4e289c66baac48422730"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_l21bc26ebc141423380eab98f1706e5cb"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_l21bc26ebc141423380eab98f1706e5cb"></a>Specifies the TCP port listened to by the server or the local UNIX domain socket file name extension to ensure a correct connection. The default value is the <em id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_i1174213152415">PGPORT</em> environment variable.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ab15e6c001a944dca838ebd42f9e7f74d">Environment variable: <em id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_i47471312243">PGPORT</em></p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ld03c19df094f45a4961a05669c8f002b">-U, --username<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a3a416cca1381430b8c2e6863338beaf5"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ld03c19df094f45a4961a05669c8f002b"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_ld03c19df094f45a4961a05669c8f002b"></a>Specifies the user name to connect to.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a872a9d6a6395432f97e7430fc883c94e">Environment variable: <em id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_i3770137247">PGUSER</em></p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_laab2b8981c7b4421841420f81c894d25">-w, --no-password<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a0923c05dba134db887003fbb60aacda0"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_laab2b8981c7b4421841420f81c894d25"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_laab2b8981c7b4421841420f81c894d25"></a>Never issue a password prompt. The connection attempt fails if the host requires password verification and the password is not provided in other ways. This parameter is useful in batch jobs and scripts in which no user password is required.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf4347357b27e483dbe704e233495abdc">-W, --password<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a098ecc9060704b3690d0fce3d471c9b0"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf4347357b27e483dbe704e233495abdc"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_lf4347357b27e483dbe704e233495abdc"></a>Specifies the user password to connect to. If the host uses the trust authentication policy, the administrator does not need to enter the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b28621310244">-W</strong> option. If the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b786161392413">-W</strong> option is not provided and you are not a system administrator, the Dump Restore tool will ask you to enter a password.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_led6c2075b1be4b28a74c78494722d1df">--role<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ab9daf616834a47989333753a5b10882a"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_led6c2075b1be4b28a74c78494722d1df"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_led6c2075b1be4b28a74c78494722d1df"></a>Specifies a role name to be used for creating the dump. This option causes <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b84235270617236">gs_dumpall</strong> to issue the <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b38871315248">SET ROLE</strong> statement after connecting to the database. It is useful when the authenticated user (specified by <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_b1688151332418">-U</strong>) lacks the permissions required by <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706172357">gs_dumpall</strong>. It allows the user to switch to a role with the required permissions. Some installations have a policy against logging in directly as a system administrator. This option allows dumping data without violating the policy.</p>
|
|
</li><li id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le74d1236fc4243b085456156df98b920">--rolepassword<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aa9323fd8005b4bd08afd8a733ebe0f1f"><a name="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_le74d1236fc4243b085456156df98b920"></a><a name="en-us_topic_0000001098674090_en-us_topic_0000001145770253_le74d1236fc4243b085456156df98b920"></a>Specifies the password of the specific role.</p>
|
|
</li></ul>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s21fec5fd99d947698318af8b8b291140"><h4 class="sectiontitle">Description</h4><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ab69d27803da443a5be5062ed921e39da">The <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_en-us_topic_0058968130_b842352706172414">gs_dumpall</strong> internally invokes <a href="dws_07_0101.html#EN-US_TOPIC_0000001149216491">gs_dump</a>. For details about the diagnosis information, see <a href="dws_07_0101.html#EN-US_TOPIC_0000001149216491">gs_dump</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a75a5e08575214265add7e5001e031d8f">Once <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706172421">gs_dumpall</strong> is restored, run ANALYZE on each database so that the optimizer can provide useful statistics.</p>
|
|
<p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_aeac1d984ca7b4393a23d788b04c79318"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706172429">gs_dumpall</strong> requires all needed tablespace directories to exit before the restoration. Otherwise, database creation will fail if the databases are in non-default locations.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s20f21e78ce654218b254a440b08054b1"><h4 class="sectiontitle">Examples</h4><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_acacd75878955495a9f49e93e1f2e0735">Run <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b1551166508183558">gs_dumpall</strong> to export all databases from a cluster at a time.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_nd69d987cd21142588c7ed1a9a4c2e266"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_ac826195e74b34bf09c1b92a98b44de0e"><strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706172446">gs_dumpall</strong> supports only plain-text format export. Therefore, only <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b04351214193416">gsql</strong> can be used to restore a file exported using <strong id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_b842352706172452">gs_dumpall</strong>.</p>
|
|
</div></div>
|
|
</div>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_s8821602bd71b409e90e44082973996d8">gs_dumpall -f backup/bkp2.sql -p 37300
|
|
gs_dump[port='37300'][dbname='postgres'][2018-06-27 09:55:09]: The total objects number is 2371.
|
|
gs_dump[port='37300'][dbname='postgres'][2018-06-27 09:55:35]: [100.00%] 2371 objects have been dumped.
|
|
gs_dump[port='37300'][dbname='postgres'][2018-06-27 09:55:46]: dump database dbname='postgres' successfully
|
|
gs_dump[port='37300'][dbname='postgres'][2018-06-27 09:55:46]: total time: 55567 ms
|
|
gs_dumpall[port='37300'][2018-06-27 09:55:46]: dumpall operation successful
|
|
gs_dumpall[port='37300'][2018-06-27 09:55:46]: total time: 56088 ms</pre>
|
|
<div class="section" id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_se612c0d26bbc4f3f945d1aabf01afe89"><h4 class="sectiontitle">Helpful Links</h4><p id="EN-US_TOPIC_0000001148856437__en-us_topic_0000001098674090_en-us_topic_0000001145770253_a66c9ce54978e4a64bca93c74cb7021dc"><a href="dws_07_0101.html#EN-US_TOPIC_0000001149216491">gs_dump</a> and <a href="dws_07_0103.html#EN-US_TOPIC_0000001102016632">gs_restore</a></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_07_0100.html">Server Tool</a></div>
|
|
</div>
|
|
</div>
|
|
|