1
0
forked from docs/doc-exports
doc-exports/docs/css/api-ref/css_03_0035.html
Zheng, Xiu 99a2d77599 css api 23.5.1 20240520
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2024-06-07 17:47:08 +00:00

159 lines
12 KiB
HTML

<a name="css_03_0035"></a><a name="css_03_0035"></a>
<h1 class="topictitle1">Restoring a Snapshot</h1>
<div id="body1522117927446"><div class="section" id="css_03_0035__section874853215915"><h4 class="sectiontitle">Function</h4><p id="css_03_0035__p21061341164917">This API is used to manually restore a snapshot.</p>
</div>
<div class="section" id="css_03_0035__section8763193210910"><h4 class="sectiontitle">URI</h4><pre class="screen" id="css_03_0035__screen1695846201113">POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/{snapshot_id}/restore</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0035__table57631032695" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="css_03_0035__row4445336913"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0035__p54417338910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0035__p1644733693">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0035__p11441233696">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0035__p124403319916">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0035__row94414331098"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0035__p0441331398">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0035__p9444331997">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0035__p144412334919">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0035__p18449331896">Project ID. For details, see <a href="css_03_0071.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
<tr id="css_03_0035__row14453320917"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0035__p2044193314920">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0035__p24410331398">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0035__p844133316918">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0035__p13441833493">ID of the cluster to which the snapshot belongs.</p>
</td>
</tr>
<tr id="css_03_0035__row169341188286"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0035__p593415181284">snapshot_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0035__p293521892813">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0035__p19935121812286">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0035__p169351118192810">ID of the snapshot.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0035__section1477913211910"><h4 class="sectiontitle">Request</h4><p id="css_03_0035__p89013365455"><a href="#css_03_0035__table82481020121413">Table 2</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="css_03_0035__table82481020121413"></a><a name="table82481020121413"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0035__table82481020121413" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="css_03_0035__row18248112010149"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0035__p10441033494">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.4%" id="mcps1.3.3.3.2.5.1.2"><p id="css_03_0035__p74493316910">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.52%" id="mcps1.3.3.3.2.5.1.3"><p id="css_03_0035__p1044533896">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.08%" id="mcps1.3.3.3.2.5.1.4"><p id="css_03_0035__p154413335917">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0035__row18248182013148"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0035__p837215054813">targetCluster</p>
</td>
<td class="cellrowborder" valign="top" width="12.4%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0035__p4441233891">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0035__p186181046114912">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.08%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0035__p9448924192218">ID of the cluster, to which the snapshot is to be restored.</p>
</td>
</tr>
<tr id="css_03_0035__row243315404483"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0035__p1343434015485">indices</p>
</td>
<td class="cellrowborder" valign="top" width="12.4%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0035__p61971911172012">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0035__p1543414094815">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.08%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0035__p194341340174817">Name of the index to be restored. Multiple index names are separated by commas (,). By default, data of all indices is restored. You can use the asterisk (*) to back up data of certain indices. For example, if you enter <strong id="css_03_0035__b11705646103319">2018-06*</strong>, then data of indices with the name prefix of <strong id="css_03_0035__b1371614617337">2018-06</strong> will be restored.</p>
<p id="css_03_0035__p7748181019443">The value contains 0 to 1,024 characters. Uppercase letters, spaces, and certain special characters (including "\&lt;|&gt;/?) are not allowed.</p>
</td>
</tr>
<tr id="css_03_0035__row1795115595819"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0035__p19952165545814">renamePattern</p>
</td>
<td class="cellrowborder" valign="top" width="12.4%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0035__p139521155125816">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0035__p1995220551584">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.08%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0035__p131436419191">Rule for defining the indices to be restored. The value contains a maximum of 1,024 characters.</p>
<p id="css_03_0035__p156573384511">Indices that meet the filtering condition specified by this parameter are restored. The filtering condition must be specified using regular expressions. The value contains 0 to 1,024 characters. Uppercase letters, spaces, and certain special characters (including "\&lt;|&gt;/?,) are not allowed.</p>
</td>
</tr>
<tr id="css_03_0035__row20584459142218"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0035__p0584185922218">renameReplacement</p>
</td>
<td class="cellrowborder" valign="top" width="12.4%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0035__p108383182419">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.52%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0035__p9838916243">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.08%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0035__p1958475913225">Rule for renaming an index. The value contains 0 to 1,024 characters. Uppercase letters, spaces, and certain special characters (including "\&lt;|&gt;/?,) are not allowed. For example, value <span class="parmvalue" id="css_03_0035__parmvalue563703423114216"><b>restored_index_$1</b></span> indicates that <span class="parmvalue" id="css_03_0035__parmvalue806962896114232"><b>restored_</b></span> is added in front of the names of all restored indices.</p>
<p id="css_03_0035__p105962536258">The <strong id="css_03_0035__b693144325916">renamePattern</strong> and <strong id="css_03_0035__b18215493591">renameReplacement</strong> parameters must be both configured.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0035__section19810103220915"><h4 class="sectiontitle">Response</h4><p id="css_03_0035__p20138293429">None</p>
</div>
<div class="section" id="css_03_0035__section27311857164512"><h4 class="sectiontitle">Examples</h4><p id="css_03_0035__p64419337911">Example request</p>
<pre class="screen" id="css_03_0035__screen7841540829">POST /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/index_snapshot/29a2254e-947f-4463-b65a-5f0b17515fae/restore
{
"targetCluster":"ea244205-d641-45d9-9dcb-ab2236bcd07e",
"indices":"myindex1,myindex2"
}</pre>
<p id="css_03_0035__p1729741314297">Example response</p>
<p id="css_03_0035__p5111414381">The return value is empty.</p>
</div>
<div class="section" id="css_03_0035__section87962546391"><h4 class="sectiontitle">Status Code</h4><p id="css_03_0035__p184016093313"><a href="#css_03_0035__table1130545163319">Table 3</a> describes the status code.</p>
<div class="tablenoborder"><a name="css_03_0035__table1130545163319"></a><a name="table1130545163319"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0035__table1130545163319" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status code</caption><thead align="left"><tr id="css_03_0035__row43061959330"><th align="left" class="cellrowborder" valign="top" width="18.411841184118412%" id="mcps1.3.6.3.2.4.1.1"><p id="css_03_0035__en-us_topic_0122640420_p51562446">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.99199919991999%" id="mcps1.3.6.3.2.4.1.2"><p id="css_03_0035__en-us_topic_0122640420_p15808580">Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.5961596159616%" id="mcps1.3.6.3.2.4.1.3"><p id="css_03_0035__en-us_topic_0122640420_p5426640">Status Code Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0035__row10306135113317"><td class="cellrowborder" valign="top" width="18.411841184118412%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0035__p430655133316">201</p>
</td>
<td class="cellrowborder" valign="top" width="19.99199919991999%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0035__en-us_topic_0122640420_p58675139">Created</p>
</td>
<td class="cellrowborder" valign="top" width="61.5961596159616%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0035__en-us_topic_0122640420_p55065844">The request for creating a resource has been fulfilled.</p>
</td>
</tr>
<tr id="css_03_0035__row1830612503310"><td class="cellrowborder" valign="top" width="18.411841184118412%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0035__p1030616563318">400</p>
</td>
<td class="cellrowborder" valign="top" width="19.99199919991999%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0035__en-us_topic_0122640420_p11193990">BadRequest</p>
</td>
<td class="cellrowborder" valign="top" width="61.5961596159616%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0035__en-us_topic_0122640420_p34297999">Invalid request.</p>
<p id="css_03_0035__en-us_topic_0122640420_p40246543">Modify the request instead of retrying.</p>
</td>
</tr>
<tr id="css_03_0035__row1261264514331"><td class="cellrowborder" valign="top" width="18.411841184118412%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0035__p17612174563314">403</p>
</td>
<td class="cellrowborder" valign="top" width="19.99199919991999%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0035__en-us_topic_0122640420_p50789473">Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="61.5961596159616%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0035__en-us_topic_0122640420_p20306648">The server understood the request, but is refusing to fulfill it.</p>
<p id="css_03_0035__en-us_topic_0122640420_p48542107">The client should not repeat the request without modifications.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0010.html">Snapshot Management APIs</a></div>
</div>
</div>