forked from docs/doc-exports
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>
199 lines
15 KiB
HTML
199 lines
15 KiB
HTML
<a name="dds_api_0083"></a><a name="dds_api_0083"></a>
|
|
|
|
<h1 class="topictitle1">Restoring Data to the Original DB Instance</h1>
|
|
<div id="body0000001071900958"><div class="section" id="dds_api_0083__section117711820496"><h4 class="sectiontitle">Function</h4><p id="dds_api_0083__p1639433018917">This API is used to restore data to the original DB instance.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0083__section12081471012"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0083__ul13194498"><li id="dds_api_0083__li51641620">URI format<p id="dds_api_0083__p62121397"><a name="dds_api_0083__li51641620"></a><a name="li51641620"></a>POST https://{Endpoint}/v3/{project_id}/instances/recovery</p>
|
|
</li><li id="dds_api_0083__li22221662">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0083__table65777232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0083__row46529701"><th align="left" class="cellrowborder" valign="top" width="28.002800280028005%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="dds_api_0083__p10809459">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.12281228122812%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="dds_api_0083__p3150961">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.874387438743874%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="dds_api_0083__p2775334615440">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0083__row3925534"><td class="cellrowborder" valign="top" width="28.002800280028005%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dds_api_0083__p49532829">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.12281228122812%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dds_api_0083__p52736237">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.874387438743874%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dds_api_0083__p43776822">Specifies the project ID of a tenant in a region.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0083__section420839121019"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0083__ul83080566431"><li id="dds_api_0083__li1830813567439">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0083__table6426756154514" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0083__row142645664510"><th align="left" class="cellrowborder" valign="top" width="21.81%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="dds_api_0083__p17490046">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.29%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="dds_api_0083__p7407659">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.78%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="dds_api_0083__p63149496">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="32.12%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="dds_api_0083__p3731431542">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0083__row34264566458"><td class="cellrowborder" valign="top" width="21.81%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dds_api_0083__p20942161910586">source</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.29%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dds_api_0083__p60181840">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.78%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dds_api_0083__p1516193155717">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.12%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dds_api_0083__p8161441582">Specifies the instance from which the backup was created</p>
|
|
<p id="dds_api_0083__p58381567194">For details, see <a href="#dds_api_0083__table163715367507">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0083__row9487111115810"><td class="cellrowborder" valign="top" width="21.81%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dds_api_0083__p94881311135819">target</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.29%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dds_api_0083__p12488411135818">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.78%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dds_api_0083__p18567123455819">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.12%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dds_api_0083__p11489174845818">Specifies the instance to which the backup is restored.</p>
|
|
<p id="dds_api_0083__p8528161012204">For details, see <a href="#dds_api_0083__table168109911">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dds_api_0083__table163715367507"></a><a name="table163715367507"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0083__table163715367507" frame="border" border="1" rules="all"><caption><b>Table 3 </b>source field data structure description</caption><thead align="left"><tr id="dds_api_0083__row9637103616501"><th align="left" class="cellrowborder" valign="top" width="21.6%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="dds_api_0083__p6927161055116">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.5%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="dds_api_0083__p139288103515">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.869999999999997%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="dds_api_0083__p1792911005118">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="32.029999999999994%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="dds_api_0083__p1027310471944">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0083__row1863793617509"><td class="cellrowborder" valign="top" width="21.6%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dds_api_0083__p22303345174853">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.5%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dds_api_0083__p61740531174853">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dds_api_0083__p34927138174853">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.029999999999994%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dds_api_0083__p5563313">Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0083__row1637173618507"><td class="cellrowborder" valign="top" width="21.6%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dds_api_0083__p8056259175641">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.5%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dds_api_0083__p48577249175641">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dds_api_0083__p42443136175641">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.029999999999994%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dds_api_0083__p1527510301221">Specifies the restoration mode. Enumerated values include:</p>
|
|
<ul id="dds_api_0083__ul5275430325"><li id="dds_api_0083__li027513301726"><strong id="dds_api_0083__b4625195215113">backup</strong>: indicates using backup files for restoration. In this mode, <span class="parmname" id="dds_api_0083__parmname151076313376"><b>type</b></span> is optional and <strong id="dds_api_0083__b16665175618110">backup_id</strong> is mandatory.</li><li id="dds_api_0083__li027520301029"><strong id="dds_api_0083__b199505241828">timestamp</strong>: indicates the point-in-time restoration mode. In this mode, <strong id="dds_api_0083__b09438330210">type</strong> is mandatory and <strong id="dds_api_0083__b14861943422">restore_time</strong> is mandatory.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0083__row166371436195010"><td class="cellrowborder" valign="top" width="21.6%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dds_api_0083__p146385361506">backup_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.5%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dds_api_0083__p6638736145019">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dds_api_0083__p1363812362509">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.029999999999994%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dds_api_0083__p5275540427">Specifies the ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_0083__row459010618010"><td class="cellrowborder" valign="top" width="21.6%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dds_api_0083__p175901365015">restore_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.5%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dds_api_0083__p459011610018">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dds_api_0083__p115241317142819">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.029999999999994%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dds_api_0083__p64067471729">Specifies the time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC.</p>
|
|
<div class="note" id="dds_api_0083__note48462510579"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dds_api_0083__p7848856572">This parameter takes effect only for replica set instances.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dds_api_0083__table168109911"></a><a name="table168109911"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0083__table168109911" frame="border" border="1" rules="all"><caption><b>Table 4 </b>target field data structure description</caption><thead align="left"><tr id="dds_api_0083__row13912919110"><th align="left" class="cellrowborder" valign="top" width="21.6%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="dds_api_0083__p1591191515">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.5%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="dds_api_0083__p69791110">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.869999999999997%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="dds_api_0083__p1999913115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="32.029999999999994%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="dds_api_0083__p99991616">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0083__row20917917113"><td class="cellrowborder" valign="top" width="21.6%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="dds_api_0083__p591391314">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.5%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="dds_api_0083__p4915920114">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="dds_api_0083__p1391792112">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="32.029999999999994%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="dds_api_0083__p1855714244112">Specifies ID of the DB instance to be restored from a backup. You can call the API for querying DB Instances to obtain the DB instance ID. If you do not have an instance, you can call the API used for creating an instance.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="dds_api_0083__li14637152124414">Request example<div class="p" id="dds_api_0083__p933124703816"><a name="dds_api_0083__li14637152124414"></a><a name="li14637152124414"></a>POST https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/recovery<ul id="dds_api_0083__ul16472346193814"><li id="dds_api_0083__li12472846113813">Restoring a backup:<pre class="codeblock" id="dds_api_0083__codeblock1847217462383">{
|
|
"source": {
|
|
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02",
|
|
"type": "backup",
|
|
"backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe"
|
|
},
|
|
"target": {
|
|
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02"
|
|
}
|
|
}</pre>
|
|
</li><li id="dds_api_0083__li94728466386">Restoring to a point in time (applicable to replica set instances and cluster instances 4.0)<pre class="codeblock" id="dds_api_0083__codeblock1747264610381">{
|
|
"source": {
|
|
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02",
|
|
"type": "timestamp",
|
|
"restore_time": 1532001446987
|
|
},
|
|
"target": {
|
|
"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0083__section1229512143106"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0083__ul51626053183341"><li id="dds_api_0083__li7845712183341">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0083__table30427456" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0083__row47542385"><th align="left" class="cellrowborder" valign="top" width="25.629999999999995%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="dds_api_0083__p25727981">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30.270000000000003%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="dds_api_0083__p3591713">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.1%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="dds_api_0083__p1527375818313">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_0083__row65226014010"><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dds_api_0083__p145228017020">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.270000000000003%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dds_api_0083__p152250501">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.1%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dds_api_0083__p195221001304">ID of the asynchronous task for the restore operation.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="dds_api_0083__ul1226458173158"><li id="dds_api_0083__li11038126173158">Response example<pre class="codeblock" id="dds_api_0083__codeblock126635241585">{
|
|
"job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_0083__section571819241003"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0083__dds_api_0018_p16131712193312">Status Code:200.</p>
|
|
<p id="dds_api_0083__dds_api_0018_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_0083__section9718724901"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0083__dds_api_0018_p20466124120334">For more information, see <a href="dds_error_code.html">Error Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_backup_restore.html">Backup and Restoration</a></div>
|
|
</div>
|
|
</div>
|
|
|