doc-exports/docs/rds/api-ref/en-us_topic_0037147508.html
Wang , Deng Ke 5208dcae7b RDS API 20221104 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-10 09:55:48 +00:00

184 lines
16 KiB
HTML

<a name="en-us_topic_0037147508"></a><a name="en-us_topic_0037147508"></a>
<h1 class="topictitle1">Restoring Data to the Original DB Instance</h1>
<div id="body1473069794004"><div class="section" id="en-us_topic_0037147508__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0037147508__p3631239417316">This API is used to restore data to the original DB instance.</p>
</div>
<div class="section" id="en-us_topic_0037147508__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0037147508__ul3084351717316"><li id="en-us_topic_0037147508__li915620217316">URI format<p id="en-us_topic_0037147508__p2567371617050"><a name="en-us_topic_0037147508__li915620217316"></a><a name="li915620217316"></a>PATH: /rds/v1/{project_id}/instances/{instanceId}/action</p>
<p id="en-us_topic_0037147508__p63209619154918">Method: POST</p>
</li><li id="en-us_topic_0037147508__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0037147508__row60083059"><th align="left" class="cellrowborder" valign="top" width="21.67%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="en-us_topic_0037147508__p34889605"><strong id="en-us_topic_0037147508__b842352706102328_1">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.07%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="en-us_topic_0037147508__p7485743"><strong id="en-us_topic_0037147508__b842352706102346_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.260000000000005%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="en-us_topic_0037147508__p2365466"><strong id="en-us_topic_0037147508__b842352706163417_1">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row57385070"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0037147508__p17679057">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.07%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0037147508__p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.260000000000005%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0037147508__p28182251">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="en-us_topic_0037147508__row2864326155157"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0037147508__p41557789155220">instanceId</p>
</td>
<td class="cellrowborder" valign="top" width="28.07%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0037147508__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.260000000000005%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0037147508__p7417132564016">Specifies the primary node ID of the DB instance.</p>
<div class="note" id="en-us_topic_0037147508__note18250133224019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="en-us_topic_0037147508__p142501332164011">This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0037147508__li24561586151526">Restrictions<p id="en-us_topic_0037147508__p19727688151526"><a name="en-us_topic_0037147508__li24561586151526"></a><a name="li24561586151526"></a>The DB engine Microsoft SQL Server is not supported.</p>
</li></ul>
</div>
<div class="section" id="en-us_topic_0037147508__section3074340117316"><h4 class="sectiontitle">Request</h4><ul id="en-us_topic_0037147508__ul5099287616954"><li id="en-us_topic_0037147508__li5628270116954">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table3678226816954" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0037147508__row1340482316954"><th align="left" class="cellrowborder" valign="top" width="18.04819518048195%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="en-us_topic_0037147508__p1204887716954"><strong id="en-us_topic_0037147508__b842352706102328_5">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.06729327067293%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="en-us_topic_0037147508__p5641325215138"><strong id="en-us_topic_0037147508__b842352706102346_5">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.918008199180083%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="en-us_topic_0037147508__p3077560415137"><strong id="en-us_topic_0037147508__b842352706164541_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="34.96650334966503%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="en-us_topic_0037147508__p6554990116954"><strong id="en-us_topic_0037147508__b842352706163417_5">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row794180116954"><td class="cellrowborder" valign="top" width="18.04819518048195%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="en-us_topic_0037147508__p3930611216954">restore</p>
</td>
<td class="cellrowborder" valign="top" width="27.06729327067293%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="en-us_topic_0037147508__p2196665315138">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.918008199180083%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="en-us_topic_0037147508__p41480320151354">Dictionary data structure. For details, see <a href="#en-us_topic_0037147508__table634280816954">Table 3</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="34.96650334966503%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="en-us_topic_0037147508__p3798745816954">Specifies the restore information, including <strong id="en-us_topic_0037147508__b842352706164349">backupRef</strong> and <strong id="en-us_topic_0037147508__b842352706164353">restoreTime</strong>. At least one of them must be specified. If both of them are specified, only <strong id="en-us_topic_0037147508__b31486606164525">backupRef</strong> takes effect.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0037147508__table634280816954"></a><a name="table634280816954"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table634280816954" frame="border" border="1" rules="all"><caption><b>Table 3 </b>restore field data structure description</caption><thead align="left"><tr id="en-us_topic_0037147508__row2197661216954"><th align="left" class="cellrowborder" valign="top" width="18.8%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="en-us_topic_0037147508__p3527513616954"><strong id="en-us_topic_0037147508__b842352706102328_7">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.31%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="en-us_topic_0037147508__p40764322151251"><strong id="en-us_topic_0037147508__b842352706102346_7">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.17%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="en-us_topic_0037147508__p25282334151257"><strong id="en-us_topic_0037147508__b842352706164541_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.72%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="en-us_topic_0037147508__p4880423616954"><strong id="en-us_topic_0037147508__b842352706163417_7">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row6082906916954"><td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="en-us_topic_0037147508__p2820759516954">backupRef</p>
</td>
<td class="cellrowborder" valign="top" width="26.31%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="en-us_topic_0037147508__p25894537151251">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.17%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="en-us_topic_0037147508__p51393005151257">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.72%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="en-us_topic_0037147508__p2900499116954">Specifies the full backup file ID.</p>
<div class="notice" id="en-us_topic_0037147508__note16651710113411"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="en-us_topic_0037147508__p1754195923415">If <span class="parmname" id="en-us_topic_0037147508__parmname10508360356"><b>backupRef</b></span> is empty, <span class="parmname" id="en-us_topic_0037147508__parmname1672544516344"><b>restoreTime</b></span> is mandatory. Otherwise, an error is reported.</p>
</div></div>
</td>
</tr>
<tr id="en-us_topic_0037147508__row14634957211441"><td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="en-us_topic_0037147508__p44580875211441">restoreTime</p>
</td>
<td class="cellrowborder" valign="top" width="26.31%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="en-us_topic_0037147508__p19527020151251">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.17%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="en-us_topic_0037147508__p18755047151257">Long</p>
</td>
<td class="cellrowborder" valign="top" width="35.72%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="en-us_topic_0037147508__p34698034211441">Specifies the time point to which the DB instance is restored.</p>
<div class="notice" id="en-us_topic_0037147508__note133671919350"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="en-us_topic_0037147508__p138101919355">If <strong id="en-us_topic_0037147508__b52371656103514">restoreTime</strong> is empty, <span class="parmname" id="en-us_topic_0037147508__parmname03841913359"><b>backupRef</b></span> is mandatory. Otherwise, an error is reported.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0037147508__ul1041877316954"><li id="en-us_topic_0037147508__li2666010016954">Request example<pre class="codeblock" id="en-us_topic_0037147508__codeblock57848163174212">{
"restore": {
"backupRef":"a9832168-7541-4536-b8d9-a8a9b79cf1b4"
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0037147508__section28521534113742"><h4 class="sectiontitle">Normal Response</h4><ul id="en-us_topic_0037147508__ul12573920"><li id="en-us_topic_0037147508__li46056421">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table11854613" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0037147508__row48728718"><th align="left" class="cellrowborder" valign="top" width="24.122412241224122%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="en-us_topic_0037147508__p54712068"><strong id="en-us_topic_0037147508__b842352706102328_9">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.544254425442546%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="en-us_topic_0037147508__p2492560"><strong id="en-us_topic_0037147508__b842352706164541_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="en-us_topic_0037147508__p570775"><strong id="en-us_topic_0037147508__b842352706163417_9">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row46232835"><td class="cellrowborder" valign="top" width="24.122412241224122%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="en-us_topic_0037147508__p53872188">extendparam</p>
</td>
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="en-us_topic_0037147508__p1571113">Dictionary data structure. For details, see <a href="#en-us_topic_0037147508__table52869820">Table 5</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="en-us_topic_0037147508__p4491214">Indicates the returned <strong id="en-us_topic_0037147508__b842352706113519">extendparam</strong> key-value pair.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0037147508__table52869820"></a><a name="table52869820"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table52869820" frame="border" border="1" rules="all"><caption><b>Table 5 </b>extendparam field data structure description</caption><thead align="left"><tr id="en-us_topic_0037147508__row50931783"><th align="left" class="cellrowborder" valign="top" width="23.932393239323936%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="en-us_topic_0037147508__p31833731"><strong id="en-us_topic_0037147508__b842352706102328_11">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.734273427342735%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="en-us_topic_0037147508__p28395444"><strong id="en-us_topic_0037147508__b842352706164541_7">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="en-us_topic_0037147508__p18329666"><strong id="en-us_topic_0037147508__b842352706163417_11">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row8307988"><td class="cellrowborder" valign="top" width="23.932393239323936%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0037147508__p1858451">jobs</p>
</td>
<td class="cellrowborder" valign="top" width="42.734273427342735%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0037147508__p16316838">List data structure. For details, see <a href="#en-us_topic_0037147508__table32267243">Table 6</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0037147508__p16706408">Indicates the returned <strong id="en-us_topic_0037147508__b842352706113940">jobs</strong> parameter information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0037147508__table32267243"></a><a name="table32267243"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0037147508__table32267243" frame="border" border="1" rules="all"><caption><b>Table 6 </b>jobs field data structure description</caption><thead align="left"><tr id="en-us_topic_0037147508__row9230088"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="en-us_topic_0037147508__p9439626"><strong id="en-us_topic_0037147508__b842352706102328_13">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="en-us_topic_0037147508__p26412257"><strong id="en-us_topic_0037147508__b842352706164541_9">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="en-us_topic_0037147508__p59018101"><strong id="en-us_topic_0037147508__b842352706163417_13">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0037147508__row15736877"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="en-us_topic_0037147508__p66727538">id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="en-us_topic_0037147508__p36221483">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="en-us_topic_0037147508__p48259009">Indicates the task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0037147508__ul16665627"><li id="en-us_topic_0037147508__li15772917">Response example<pre class="codeblock" id="en-us_topic_0037147508__codeblock314170531760">{
"extendparam": {
"jobs": [
{
"id": "ff80808156fa51c50156fa7c20210bc9"
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0037147508__section51597550"><h4 class="sectiontitle">Abnormal Response</h4><p id="en-us_topic_0037147508__p28475059">For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_06_0018.html">Backup and Restoration</a></div>
</div>
</div>