doc-exports/docs/evs/api-ref/evs_04_2022.html
zhangyue f3b09e5d2f Elastic Volume Service API V1
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-02-02 16:28:20 +00:00

211 lines
16 KiB
HTML

<a name="evs_04_2022"></a><a name="evs_04_2022"></a>
<h1 class="topictitle1">Rolling Back a Snapshot to an EVS Disk</h1>
<div id="body1489026315011"><div class="section" id="evs_04_2022__section29798282112049"><h4 class="sectiontitle">Function</h4><p id="evs_04_2022__p64850661112049">This API is used to roll back a snapshot to an EVS disk.</p>
</div>
<div class="section" id="evs_04_2022__section18412201112049"><h4 class="sectiontitle">Constraints</h4><ul id="evs_04_2022__ul2407842411214"><li id="evs_04_2022__li4814287111214">When you roll back a snapshot to a disk, you can only roll back the snapshot to the source disk. Rollback to a specified disk is not supported.</li><li id="evs_04_2022__li57262698112110">You can roll back a disk from a snapshot only when the disk is in the <span class="wintitle" id="evs_04_2022__wintitle152900198152815"><b>available</b></span> or <span class="wintitle" id="evs_04_2022__wintitle191347052152823"><b>error_rollbacking</b></span> state.</li><li id="evs_04_2022__li205112014202915">Snapshots whose names started with prefix <strong id="evs_04_2022__b22712614407">autobk_snapshot_</strong> are automatically created by the system during backup creations. Do not use these snapshots to roll back the disk data.</li></ul>
</div>
<div class="section" id="evs_04_2022__section56404342112049"><h4 class="sectiontitle">URI</h4><ul id="evs_04_2022__ul5348971112049"><li id="evs_04_2022__li48140745112049">URI format<p id="evs_04_2022__p44237826212214"><a name="evs_04_2022__li48140745112049"></a><a name="li48140745112049"></a>POST /v2/{project_id}/os-vendor-snapshots/{snapshot_id}/rollback</p>
</li></ul>
<ul id="evs_04_2022__ul7086238112049"><li id="evs_04_2022__li63776143112049">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__table37114383112049" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__row4845983112049"><th align="left" class="cellrowborder" valign="top" width="28.57%" id="mcps1.3.3.3.1.1.1.4.1.1"><p id="evs_04_2022__p56980371112049">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.529999999999998%" id="mcps1.3.3.3.1.1.1.4.1.2"><p id="evs_04_2022__p52007339112049">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.9%" id="mcps1.3.3.3.1.1.1.4.1.3"><p id="evs_04_2022__p51844944112049">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__row38690921112049"><td class="cellrowborder" valign="top" width="28.57%" headers="mcps1.3.3.3.1.1.1.4.1.1 "><p id="evs_04_2022__p46956895112049">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.3.1.1.1.4.1.2 "><p id="evs_04_2022__p45412121112049">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.9%" headers="mcps1.3.3.3.1.1.1.4.1.3 "><p id="evs_04_2022__p54503167112049">The project ID.</p>
</td>
</tr>
<tr id="evs_04_2022__row20766463112049"><td class="cellrowborder" valign="top" width="28.57%" headers="mcps1.3.3.3.1.1.1.4.1.1 "><p id="evs_04_2022__p4361939112049">snapshot_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.3.1.1.1.4.1.2 "><p id="evs_04_2022__p17772808112049">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.9%" headers="mcps1.3.3.3.1.1.1.4.1.3 "><p id="evs_04_2022__p30311366112049">The snapshot ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="evs_04_2022__section54272198112126"><h4 class="sectiontitle">Request</h4><ul id="evs_04_2022__ul1618491911810"><li id="evs_04_2022__li51856193189">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__table9185191931813" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__row418511198189"><th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="evs_04_2022__p7185219111814">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.801980198019802%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="evs_04_2022__p17185419171810">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="evs_04_2022__p918520193181">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.51485148514851%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="evs_04_2022__p31851819151817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__row201857197184"><td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="evs_04_2022__p11186181941818">rollback</p>
</td>
<td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="evs_04_2022__p5186101971818">Object</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="evs_04_2022__p218641911810">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.51485148514851%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="evs_04_2022__p14186519171816">The snapshot rollback information. For details, see <a href="#evs_04_2022__li37311846112126">Parameters in the rollback field</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="evs_04_2022__ul33971922112126"><li id="evs_04_2022__li37311846112126"><a name="evs_04_2022__li37311846112126"></a><a name="li37311846112126"></a>Parameters in the <strong id="evs_04_2022__b177056251512">rollback</strong> field
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__table262294112126" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__row15086975112126"><th align="left" class="cellrowborder" valign="top" width="20.57%" id="mcps1.3.4.3.1.2.1.5.1.1"><p id="evs_04_2022__p14085481112126">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.29%" id="mcps1.3.4.3.1.2.1.5.1.2"><p id="evs_04_2022__p73303112126">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.03%" id="mcps1.3.4.3.1.2.1.5.1.3"><p id="evs_04_2022__p5937586112126">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.11%" id="mcps1.3.4.3.1.2.1.5.1.4"><p id="evs_04_2022__p11182433112126">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__row47675000112126"><td class="cellrowborder" valign="top" width="20.57%" headers="mcps1.3.4.3.1.2.1.5.1.1 "><p id="evs_04_2022__p36469802112126">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.29%" headers="mcps1.3.4.3.1.2.1.5.1.2 "><p id="evs_04_2022__p1264009112126">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.03%" headers="mcps1.3.4.3.1.2.1.5.1.3 "><p id="evs_04_2022__p35275900112126">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.11%" headers="mcps1.3.4.3.1.2.1.5.1.4 "><p id="evs_04_2022__p16492175643818">The ID of the target disk.</p>
</td>
</tr>
<tr id="evs_04_2022__row13436622112126"><td class="cellrowborder" valign="top" width="20.57%" headers="mcps1.3.4.3.1.2.1.5.1.1 "><p id="evs_04_2022__p14624579112126">name</p>
</td>
<td class="cellrowborder" valign="top" width="14.29%" headers="mcps1.3.4.3.1.2.1.5.1.2 "><p id="evs_04_2022__p43740265112126">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.03%" headers="mcps1.3.4.3.1.2.1.5.1.3 "><p id="evs_04_2022__p53300583112126">No</p>
</td>
<td class="cellrowborder" valign="top" width="48.11%" headers="mcps1.3.4.3.1.2.1.5.1.4 "><p id="evs_04_2022__p22380006112126">The name of the target disk. <span id="evs_04_2022__text1381853551201921">The value can contain a maximum of 255 bytes.</span></p>
<div class="note" id="evs_04_2022__note6490498915441"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="evs_04_2022__p4727398915441">Parameter <strong id="evs_04_2022__b842352706145847">name</strong> cannot be used independently. When <strong id="evs_04_2022__b84235270615149">name</strong> is going to be used, <strong id="evs_04_2022__b84235270615212">volume_id</strong> must also be specified.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="evs_04_2022__ul7571072112126"><li id="evs_04_2022__li1030790112126">Example request<pre class="screen" id="evs_04_2022__screen20703801105829">{
"rollback": {
"name": "test-001",
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635"
}
}</pre>
</li></ul>
</div>
<div class="section" id="evs_04_2022__section50618846112239"><h4 class="sectiontitle">Response</h4><ul id="evs_04_2022__ul6485874112239"><li id="evs_04_2022__li58372866112239">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__table55593749112239" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__row12503066112239"><th align="left" class="cellrowborder" valign="top" width="19.05%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="evs_04_2022__p6115391112239">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.810000000000002%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="evs_04_2022__p25584640112239">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.14%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="evs_04_2022__p21559929112239">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__row59821639112239"><td class="cellrowborder" valign="top" width="19.05%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="evs_04_2022__p13714567112239">rollback</p>
</td>
<td class="cellrowborder" valign="top" width="23.810000000000002%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="evs_04_2022__p37138152112239">Object</p>
</td>
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="evs_04_2022__p58242347112239">The snapshot rollback information. For details, see <a href="#evs_04_2022__li1951113011190">Parameter in the rollback field</a>.</p>
</td>
</tr>
<tr id="evs_04_2022__row434455911170"><td class="cellrowborder" valign="top" width="19.05%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="evs_04_2022__p129522216412">error</p>
</td>
<td class="cellrowborder" valign="top" width="23.810000000000002%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="evs_04_2022__p1595262111415">Object</p>
</td>
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="evs_04_2022__p109527215417">The error message returned if an error occurs. For details, see <a href="#evs_04_2022__li0419202382514">Parameters in the error field</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="evs_04_2022__li1951113011190"><a name="evs_04_2022__li1951113011190"></a><a name="li1951113011190"></a>Parameter in the <strong id="evs_04_2022__b592814206503">rollback</strong> field
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__table051223010193" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__row1351211309194"><th align="left" class="cellrowborder" valign="top" width="19.05%" id="mcps1.3.5.2.2.2.1.4.1.1"><p id="evs_04_2022__p1551203041918">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.810000000000002%" id="mcps1.3.5.2.2.2.1.4.1.2"><p id="evs_04_2022__p11512183013191">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.14%" id="mcps1.3.5.2.2.2.1.4.1.3"><p id="evs_04_2022__p451263020195">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__row13513173071913"><td class="cellrowborder" valign="top" width="19.05%" headers="mcps1.3.5.2.2.2.1.4.1.1 "><p id="evs_04_2022__p25133307192">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.810000000000002%" headers="mcps1.3.5.2.2.2.1.4.1.2 "><p id="evs_04_2022__p1151353011199">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.2.2.1.4.1.3 "><p id="evs_04_2022__p451323041912">The ID of the target disk that the snapshot data rolled back to.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="evs_04_2022__li0419202382514"><a name="evs_04_2022__li0419202382514"></a><a name="li0419202382514"></a>Parameters in the <strong id="evs_04_2022__evs_04_2013_b1288034833610">error</strong> field
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2022__evs_04_2013_table15441099103019" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2022__evs_04_2013_row54094047103019"><th align="left" class="cellrowborder" valign="top" width="21.17788221177882%" id="mcps1.3.5.2.3.2.1.4.1.1"><p id="evs_04_2022__evs_04_2013_p19541716103019">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.17788221177882%" id="mcps1.3.5.2.3.2.1.4.1.2"><p id="evs_04_2022__evs_04_2013_p39375186103019">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.64423557644236%" id="mcps1.3.5.2.3.2.1.4.1.3"><p id="evs_04_2022__evs_04_2013_p38578950103019">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_2022__evs_04_2013_row59401790103019"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.5.2.3.2.1.4.1.1 "><p id="evs_04_2022__evs_04_2013_p46815658103019">message</p>
</td>
<td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.5.2.3.2.1.4.1.2 "><p id="evs_04_2022__evs_04_2013_p33971979103019">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.64423557644236%" headers="mcps1.3.5.2.3.2.1.4.1.3 "><p id="evs_04_2022__evs_04_2013_p21623243103019">The error message returned if an error occurs.</p>
</td>
</tr>
<tr id="evs_04_2022__evs_04_2013_row60391466103019"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.5.2.3.2.1.4.1.1 "><p id="evs_04_2022__evs_04_2013_p59870541103019">code</p>
</td>
<td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.5.2.3.2.1.4.1.2 "><p id="evs_04_2022__evs_04_2013_p17675690103019">String</p>
</td>
<td class="cellrowborder" valign="top" width="57.64423557644236%" headers="mcps1.3.5.2.3.2.1.4.1.3 "><p id="evs_04_2022__evs_04_2013_p6087468103019">The error code returned if an error occurs.</p>
<p id="evs_04_2022__evs_04_2013_p54787218103019">For details about the error code, see <a href="evs_04_0038.html">Error Codes</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="evs_04_2022__ul4884163611233"><li id="evs_04_2022__li3692154711233">Example response<pre class="screen" id="evs_04_2022__screen61791075112310">{
"rollback": {
"volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635"
}
}</pre>
<p id="evs_04_2022__p52821068113531">or</p>
<pre class="screen" id="evs_04_2022__screen14479082153225">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
<p id="evs_04_2022__p5655715720175">In the preceding example, <strong id="evs_04_2022__b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_04_2022__b842352706144438">badRequest</strong> or <strong id="evs_04_2022__b842352706144454">itemNotFound</strong>. An example is provided as follows:</p>
<pre class="screen" id="evs_04_2022__screen57622632153247">{
"badRequest": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="evs_04_2022__section16529200112352"><h4 class="sectiontitle">Status Codes</h4><ul id="evs_04_2022__ul63796794112352"><li id="evs_04_2022__li37300236112352">Normal<p id="evs_04_2022__p157808112352"><a name="evs_04_2022__li37300236112352"></a><a name="li37300236112352"></a>202</p>
</li></ul>
</div>
<div class="section" id="evs_04_2022__section431317151242"><h4 class="sectiontitle">Error Codes</h4><p id="evs_04_2022__evs_04_2013_p783819215242">For details, see <a href="evs_04_0038.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="evs_04_2015.html">EVS Snapshot</a></div>
</div>
</div>