doc-exports/docs/vbs/api-ref/en-us_topic_0020237257.html
Wei, Hongmin 63123ef1be VBS API initial version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2022-10-25 07:47:39 +00:00

213 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0020237257"></a><a name="EN-US_TOPIC_0020237257"></a>
<h1 class="topictitle1">Restoring a Disk Using a VBS Backup</h1>
<div id="body35572112"><div class="section" id="EN-US_TOPIC_0020237257__section27869743"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020237257__p52701704165929">This API is used to restore a disk using a VBS backup.</p>
</div>
<div class="section" id="EN-US_TOPIC_0020237257__section49501095"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0020237257__ul51110099"><li id="EN-US_TOPIC_0020237257__li57337714">URI format<p id="EN-US_TOPIC_0020237257__p13843256"><a name="EN-US_TOPIC_0020237257__li57337714"></a><a name="li57337714"></a>POST /v2/{project_id}/cloudbackups/{backup_id}/restore</p>
</li><li id="EN-US_TOPIC_0020237257__li57480441">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020237257__table47561922" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020237257__row3241099"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.1"><p id="EN-US_TOPIC_0020237257__p61202487">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.2"><p id="EN-US_TOPIC_0020237257__p58454448">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.3"><p id="EN-US_TOPIC_0020237257__p37189853">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020237257__row59588135"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="EN-US_TOPIC_0020237257__p61909621">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="EN-US_TOPIC_0020237257__p48623408">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="EN-US_TOPIC_0020237257__p64170449">Project ID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row12984378"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="EN-US_TOPIC_0020237257__p45101667">backup_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="EN-US_TOPIC_0020237257__p29356372">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="EN-US_TOPIC_0020237257__p29055926">ID of the backup used to restore a disk</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0020237257__section42856673"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0020237257__ul4719792"><li id="EN-US_TOPIC_0020237257__li42478134">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020237257__table46758891" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020237257__row52209455"><th align="left" class="cellrowborder" valign="top" width="15.42%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="EN-US_TOPIC_0020237257__p61804813">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.61%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="EN-US_TOPIC_0020237257__p40133923">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.719999999999999%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="EN-US_TOPIC_0020237257__p14225104112">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.25%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="EN-US_TOPIC_0020237257__p29622330">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020237257__row1125861217951"><td class="cellrowborder" valign="top" width="15.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0020237257__p3953240217951">restore</p>
</td>
<td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0020237257__p4800796817951">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.719999999999999%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0020237257__p6344016617951">dict</p>
</td>
<td class="cellrowborder" valign="top" width="55.25%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0020237257__p3837982117951">Restoration operation</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row803253"><td class="cellrowborder" valign="top" width="15.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0020237257__p65063572">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0020237257__p35658012">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.719999999999999%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0020237257__p19134484104243">string</p>
</td>
<td class="cellrowborder" valign="top" width="55.25%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0020237257__p2617844">ID of the disk to be restored</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0020237257__ul10718788"><li id="EN-US_TOPIC_0020237257__li29360233">Example request<pre class="screen" id="EN-US_TOPIC_0020237257__screen12369965101219">{
"restore":{
"volume_id":"c96e4a94-927a-425c-8795-63f9964cfebd"
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0020237257__section50165743"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0020237257__ul30656219"><li id="EN-US_TOPIC_0020237257__li318532202537">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020237257__table1074363117217" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020237257__row5713530117217"><th align="left" class="cellrowborder" valign="top" width="14.87%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0020237257__p1496715471480">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.189999999999998%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0020237257__p596716471583">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.94%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0020237257__p16967114718811">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020237257__row4782981617217"><td class="cellrowborder" valign="top" width="14.87%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0020237257__p4900987817217">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.189999999999998%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0020237257__p3524563217217">string</p>
</td>
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0020237257__p3632393217217">Job ID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row5847993217217"><td class="cellrowborder" valign="top" width="14.87%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0020237257__p3925401317217">message</p>
</td>
<td class="cellrowborder" valign="top" width="16.189999999999998%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0020237257__p4887090517217">string</p>
</td>
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0020237257__p6622925217217">Error message returned after an error occurs</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row5919236117217"><td class="cellrowborder" valign="top" width="14.87%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0020237257__p2985196017217">code</p>
</td>
<td class="cellrowborder" valign="top" width="16.189999999999998%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0020237257__p3504729117217">string</p>
</td>
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0020237257__p2025830317217">Error code returned after an error occurs</p>
<p id="EN-US_TOPIC_0020237257__p4810700217217">For details about error codes, see <a href="en-us_topic_0022472083.html">Error Codes</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0020237257__li7470517">Example response<pre class="screen" id="EN-US_TOPIC_0020237257__screen66370827101225">{
"job_id": "70a599e0-31e7-49b7-b260-868f441e862b"
}</pre>
<p id="EN-US_TOPIC_0020237257__p24592149">or</p>
<pre class="screen" id="EN-US_TOPIC_0020237257__screen284529101230">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0020237257__section48838504"><h4 class="sectiontitle">Status Codes</h4><ul id="EN-US_TOPIC_0020237257__ul18702178"><li id="EN-US_TOPIC_0020237257__li34101881">Normal<p id="EN-US_TOPIC_0020237257__p38481481"><a name="EN-US_TOPIC_0020237257__li34101881"></a><a name="li34101881"></a>200</p>
</li><li id="EN-US_TOPIC_0020237257__li10789009">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020237257__table11884763203246" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020237257__row26015637203246"><th align="left" class="cellrowborder" valign="top" width="43.419999999999995%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0020237257__p26891838203246">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.58%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0020237257__p30755268203246">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020237257__row8148750203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p56068996203246">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p45294864203246">The server failed to process the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row5000592203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p2394837203246">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p59764131203246">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row1006268203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p14398889203246">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p25459379203246">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row27807822203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p37841101203246">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p45230365203246">The server could not find the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row4420107203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p22484375203246">405 Method Not Allowed</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p9295047203246">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row16546560203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p65202978203246">406 Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p46949852203246">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row19895490203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p922004203246">407 Proxy Authentication Required</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p7573523203246">You must use the proxy server for authentication so that the request can be processed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row1052846203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p18171739203246">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p62624744203246">The request timed out.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row26751786203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p19411051203246">409 Conflict</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p28791264203246">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row57794785203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p50866048203246">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p26509256203246">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row37256714203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p65003873203246">501 Not Implemented</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p30822389203246">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row8966049203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p55161370203246">502 Bad Gateway</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p38886020203246">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row14429867203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p27968577203246">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p50862235203246">Failed to complete the request because the service is unavailable.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020237257__row55106933203246"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020237257__p34476593203246">504 Gateway Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020237257__p41140645203246">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0020237257__section1362310255432"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0020237257__p129821455154315">For details, see <a href="en-us_topic_0022472083.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020237254.html">VBS Backups</a></div>
</div>
</div>