forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: zhengxiu <zhengxiu@huawei.com> Co-committed-by: zhengxiu <zhengxiu@huawei.com>
93 lines
26 KiB
HTML
93 lines
26 KiB
HTML
<a name="EN-US_TOPIC_0000001955726522"></a><a name="EN-US_TOPIC_0000001955726522"></a>
|
|
|
|
<h1 class="topictitle1">Restoring a Snapshot of an OpenSearch Cluster</h1>
|
|
<div id="body0000001955726522"><p id="EN-US_TOPIC_0000001955726522__p26411459184915">Use a snapshot to restore a point-in-time copy of an OpenSearch cluster. You can restore it to the original cluster or to another eligible cluster. This process fetches the backed-up index data, metadata, and shard structure from OBS and reconstruct them in the selected destination cluster, ensuring data consistency. This capability is essential for operations like data rollback, cluster migration, and disaster recovery.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_section79171215132210"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_ul537343941414"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_li187671653184018">Creating cluster snapshots will increase CPU load and disk I/O. To minimize impact on system performance, you are advised to schedule it to happen during off-peak hours.</li><li id="EN-US_TOPIC_0000001955726522__li14162153741419">If the source cluster is unavailable, you can restore its snapshots to a designated destination cluster.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_li19928141414179">When creating or restoring a snapshot, you can only perform certain operations, including accessing OpenSearch Dashboards, viewing metrics, and deleting other snapshots. However, you cannot perform the following operations: modifying configuration, restarting or deleting the cluster, deleting the snapshot that is being created or restored, and creating or restoring another snapshot. While a snapshot is being created or restored for a cluster, any automatic snapshot creation task initiated for that cluster will be canceled.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497077_li144702517217">When you create the first snapshot in a cluster, a full backup is performed on all data. Subsequent snapshots are all incremental, storing only the changes since the previous snapshot. Because each incremental snapshot relies on its predecessors, you must restore them in the correct sequence.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001268314505_li21323231302">Before snapshot restoration is completed, the indexes being restored to the destination cluster cannot be queried.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_li61869019106">If the two clusters have indexes with the same names but different shard structures, such indexes cannot be restored.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_li116421184317">The version of the destination cluster must be the same as (recommended) or later than that of the source cluster. Snapshots created for an Elasticsearch 7.x cluster can be restored to an OpenSearch 1.3.6 or 2.19.0 cluster.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_section207841017172319"><h4 class="sectiontitle">Prerequisites</h4><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p105685415165">In the source cluster's snapshot task list, there are snapshots whose status is <strong id="EN-US_TOPIC_0000001955726522__b1233993811127">Available</strong>. The status of the destination cluster is also <strong id="EN-US_TOPIC_0000001955726522__b758703510142">Available</strong>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_section16538152014387"><h4 class="sectiontitle">Restoring Data</h4><ol id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_ol842420532406"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1425943574317"><span id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ph1125913358434">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li3259435154320">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_uicontrol1025933554318"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li625933524313">In the cluster list, click the name of the source cluster. The cluster information page is displayed.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li102591935124312">Click the <strong id="EN-US_TOPIC_0000001955726522__b16369182011511">Cluster Snapshots</strong> tab.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_en-us_topic_0000001268314505_li16424353174016">In the cluster snapshot task list, select a snapshot, and click <strong id="EN-US_TOPIC_0000001955726522__b11394141012429">Restore</strong> in the <strong id="EN-US_TOPIC_0000001955726522__b6394191020427">Operation</strong> column. In the displayed dialog box, configure necessary settings.
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_table125132619300" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Restoration settings</caption><thead align="left"><tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row195242693014"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.4.2.5.3.2.3.1.1"><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p145210263309">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.4.2.5.3.2.3.1.2"><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p95232614309">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row552162612306"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.2.5.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p3521126123019">Index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.4.2.5.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p14529267301">Specify the name of the index you want to restore.</p>
|
|
<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul14857204485715"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1457495018578">The value is a string of 0 to 1024 characters that cannot contain uppercase letters, spaces, or the following special characters: <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue115745503572"><b>"\<|>/?</b></span>.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li14815175595713">When restoring an index whose name is prefixed with <strong id="EN-US_TOPIC_0000001955726522__b81642451574239">.kibana</strong>, the index name must be specified.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1481518555579">The <strong id="EN-US_TOPIC_0000001955726522__b109230766874239">.opendistro_security</strong> index cannot be restored.</li></ul>
|
|
<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul357110392584"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li12865124185813">You can use an asterisk (*) to match multiple indexes. For example, <strong id="EN-US_TOPIC_0000001955726522__b45613256874239">index*</strong> indicates that all indexes with the prefix <strong id="EN-US_TOPIC_0000001955726522__b153515756274239">index</strong> will be restored. When an asterisk (*) is used for index matching, the <strong id="EN-US_TOPIC_0000001955726522__b157188312974239">.opendistro_security</strong> index and any system indexes whose name is prefixed with <strong id="EN-US_TOPIC_0000001955726522__b155654004874239">.kibana</strong> are filtered out by default.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li9865134135820">You can restore indexes by specifying their names, for example, <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue148652041165817"><b>index1,index2,index3</b></span>.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p714954175910">By default, this parameter is left blank. That is, no index name is specified, and all indexes will be restored.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row115242613308"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.2.5.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p145222614305">Rename Pattern</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.4.2.5.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p3485927192110">Index name matching rule. Enter a regular expression. Indexes that match the regular expression will be restored.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p154991918323">The <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname208478578874239"><b>Rename Pattern</b></span> and <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname103560924674239"><b>Rename Replacement</b></span> take effect only when they are both configured at the same time. For an example, see <a href="#EN-US_TOPIC_0000001955726522__section1121914012277">Index, Rename Pattern, and Rename Replacement: Parameters and Examples</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p185212693011">The value is a string of 0 to 1024 characters that cannot contain uppercase letters, spaces, or the following special characters: <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue16684173114513"><b>"\<|>/?,</b></span>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p1239033312111">For example, <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__parmvalue174264811274239"><b>index_(.+)</b></span> indicates that all indexes whose name starts with <strong id="EN-US_TOPIC_0000001955726522__b188003430474239">index_</strong> will be renamed upon restoration.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row175219263308"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.2.5.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p115212266303">Rename Replacement</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.4.2.5.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p205391655122119">Rule for index renaming. Upon restoration, matching indexes are renamed according to the defined rule.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p3731321182211">The <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname120569459774239"><b>Rename Pattern</b></span> and <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname170599135374239"><b>Rename Replacement</b></span> take effect only when they are both configured at the same time. For an example, see <a href="#EN-US_TOPIC_0000001955726522__section1121914012277">Index, Rename Pattern, and Rename Replacement: Parameters and Examples</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p11521426113012">The value is a string of 0 to 1024 characters that cannot contain uppercase letters, spaces, or the following special characters: <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue7223141013612"><b>"\<|>/?,</b></span>.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p174811752132113">For example, <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__parmvalue114665962074239"><b>restored_index_$1</b></span> indicates that <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__parmvalue87653435774239"><b>restored_</b></span> will prefix the name of all restored indexes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row45219268302"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.2.5.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p19522264302">Cluster</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.4.2.5.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p2065111428326">Select the cluster where you want to restore the data to. You can select the current cluster or another.</p>
|
|
<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul19225330115414"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li0225173095417">You must specify a cluster whose status is <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname93122232974239"><b>Available</b></span>. If the status of the current cluster is <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname172281157374239"><b>Unavailable</b></span>, you cannot restore the snapshot to the current cluster.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li222543015413">When you choose to restore data to another cluster, make sure the target cluster has the same or later version than the current cluster, and that the two clusters are in the same region. After a frozen index is restored using a snapshot, the index is stored on the local node and is read-only by default. To make it writable, run the following command to configure the index:<pre class="screen" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_screen151451928165410">PUT <em id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_i14601158155420">index_name</em>/_settings
|
|
{
|
|
"index.blocks.write": null
|
|
}</pre>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_row342182122317"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.4.2.5.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p542921102316">Overwrite same-name indexes in destination cluster</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.4.2.5.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p16464239202511">Whether to overwrite same-name indexes in the destination cluster. By default, this option is unselected.</p>
|
|
<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p642421202310">Restoring a snapshot will overwrite existing data in the destination cluster. When there are same-name indexes in the destination cluster, you need to select this option in order to restore same-name, same-shard structure indexes. Indexes with a different shard structure cannot be restored.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li16256152262">Click <strong id="EN-US_TOPIC_0000001955726522__b119310118474818">OK</strong> to start restoring the snapshot.<p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p1909191532613">If restoration succeeds, <span class="parmname" id="EN-US_TOPIC_0000001955726522__parmname181221377274818"><b>Task Status</b></span> of the snapshot in the snapshot task list will change to <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__parmvalue5707755274818"><b>Restoration succeeded</b></span>, and the index data captured in the snapshot is reconstructed.</p>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726522__section2426195442120"><h4 class="sectiontitle">Verifying Snapshot Restoration</h4><p id="EN-US_TOPIC_0000001955726522__p19156131532315">After snapshot restoration, go to the destination cluster to check the restored index information.</p>
|
|
<ol id="EN-US_TOPIC_0000001955726522__en-us_topic_0000002271391393_ol13172153674611"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000002271391393_en-us_topic_0000001268594549_li5509181942419"><span id="EN-US_TOPIC_0000001955726522__ph152259618315">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000002271391393_li4250043448">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000002271391393_uicontrol14126137204412"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000001955726522__li201181045151113">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000001955726522__b196843400874818">Dashboards</strong> in the <strong id="EN-US_TOPIC_0000001955726522__b155508356574818">Operation</strong> column to log in to OpenSearch Dashboards.</li><li id="EN-US_TOPIC_0000001955726522__li811824512111">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000001955726522__b125404755774818">Dev Tools</strong>.<p id="EN-US_TOPIC_0000001955726522__p539424154519">The left part of the console is the command input box, and the triangle icon in its upper-right corner is the execution button. The right part shows the execution result.</p>
|
|
</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000002271391393_li270075935613">Run the following command to check index information.<pre class="screen" id="EN-US_TOPIC_0000001955726522__screen233723720413">GET _cat/indices</pre>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001955726522__section1121914012277"><a name="EN-US_TOPIC_0000001955726522__section1121914012277"></a><a name="section1121914012277"></a><h4 class="sectiontitle">Index, Rename Pattern, and Rename Replacement: Parameters and Examples</h4><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p5509924185611">This section describes the <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname03791054122617"><b>Index</b></span>, <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname17379154162611"><b>Rename Pattern</b></span>, and <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname637935482618"><b>Rename Replacement</b></span> parameters. It also provides examples to show how to configure them.</p>
|
|
<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul192441222981"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1038861853615"><strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b5302291366">Retaining the original index name when restoring an index</strong><p id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p108591818143616">Specify <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname12861132682"><b>Index</b></span> for the index to be replaced.</p>
|
|
</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li888932593614"><strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b1372303263610">Renaming an index when restoring it</strong><div class="p" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p14611519372">To rename an index upon restoring it, specify <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname83170756510207"><b>Index</b></span>, <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname95969140310207"><b>Rename Pattern</b></span>, and <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname24437851810207"><b>Rename Replacement</b></span>. Their meanings are as follows:<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul418643691018"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li122965358107"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname435211394015"><b>Index</b></span>: Specifies the name or pattern (wildcard supported) of the indexes you wish to restore. It must include the indexes that need to be renamed. This parameter defines the indexes that you wish to restore using snapshots to a designated destination cluster.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li12296193516109"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname10808141118718"><b>Rename Pattern</b></span>: Uses a regular expression to specify indexes that you wish to rename among the indexes to be restored (specified by <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname1792517271988"><b>Index</b></span>). Only indexes whose names match the regular expression exactly will be renamed.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li124353426418"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname95097812134"><b>Rename Replacement</b></span>: Defines the naming rule for restored indexes that match <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname1277449172810"><b>Rename Pattern</b></span>. This rule is a character string that uses a capture group (for example, $1) to reuse the text captured by <span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname141753163018"><b>Rename Pattern</b></span>.</li></ul>
|
|
</div>
|
|
</li></ul>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p121644198509"><strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b539193434613">Example:</strong><ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul19419163254916"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li268711354912"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname119359107117"><b>Index</b></span> is set to <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue107377131111"><b>index_*, old_index</b></span>: <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b7779193703210">index_*</strong> indicates all indexes whose name starts with <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b2482201719338">index_</strong>, and <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b181471022113310">old_index</strong> specifies a single index.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li46886394911"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname145431433338"><b>Rename Pattern</b></span> is set to <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue9407623191220"><b>index_(.+)</b></span>: This specifies that indexes whose name starts with <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b4773024193618">index_</strong> will be renamed.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li7688123144917"><span class="parmname" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmname171361152163612"><b>Rename Replacement</b></span> is set to <span class="parmvalue" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_parmvalue1784093218126"><b>restored_index_$1</b></span>: This replaces the matched index names with <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b1714293755113">restored_index_</strong> plus the text of the capture group.</li></ul>
|
|
</div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p162541247114918">The corresponding API request is as follows:<pre class="screen" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_screen1433113984912">POST /_snapshot/xxx/snapshot_xxx/_restore
|
|
{
|
|
"indices": "index_*, old_index",
|
|
"ignore_unavailable": true,
|
|
"include_global_state": true,
|
|
"rename_pattern": "index_(.+)", // This corresponds to the Rename Pattern parameter.
|
|
"rename_replacement": "restored_index_$1", // This corresponds to the Rename Replacement parameter.
|
|
}</pre>
|
|
</div>
|
|
<div class="p" id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_p163313914498">Result:<ul id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_ul933153914912"><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1133183984911">The source index <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b27201432185417">index_logs</strong> is renamed as <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b1727174716542">restored_index_logs</strong>.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li17334393493">The source index <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b1733183965519">index_users</strong> is renamed as <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b127841558135511">restored_index_users</strong>.</li><li id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_li1533123914494">The source index <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b03581387566">old_index</strong> does not match rename_pattern, and is therefore not renamed. The original name <strong id="EN-US_TOPIC_0000001955726522__en-us_topic_0000001965497113_b10155343125618">old_index</strong> is retained after restoration.</li></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0297.html">Backing up and Restoring the Data of an OpenSearch Cluster</a></div>
|
|
</div>
|
|
</div>
|
|
|