Files
doc-exports/docs/dcs/api-ref/CopyInstance.html
chenjunjie 63188fad94 DCS API 20240705 version
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
2025-03-17 15:42:06 +00:00

215 lines
14 KiB
HTML

<a name="CopyInstance"></a><a name="CopyInstance"></a>
<h1 class="topictitle1">Backing Up a DCS Instance</h1>
<div id="body1708331107508"><div class="section" id="CopyInstance__section043015711599"><h4 class="sectiontitle">Function</h4><p id="CopyInstance__p5431127125911">This API is used to back up a specific DCS instance.</p>
<div class="note" id="CopyInstance__note16431137185918"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="CopyInstance__p1443219785912">Only master/standby and cluster DCS instances can be backed up and restored, while single-node instances cannot.</p>
</div></div>
</div>
<div class="section" id="CopyInstance__section2433771595"><h4 class="sectiontitle">URI</h4><p id="CopyInstance__p6434179591">POST /v2/{project_id}/instances/{instance_id}/backups</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__table443519775913" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CopyInstance__row114341374595"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CopyInstance__p843517718596">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CopyInstance__p194351276599">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CopyInstance__p10435127115916">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CopyInstance__p74361975597">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row144341075599"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CopyInstance__p8436573599">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CopyInstance__p4436177135912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CopyInstance__p134375795916">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CopyInstance__p14372716595">Instance ID.</p>
</td>
</tr>
<tr id="CopyInstance__row1043477175910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CopyInstance__p14371474593">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CopyInstance__p10438107205912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CopyInstance__p943807195910">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CopyInstance__p1443867125917">Project ID. For details, see <a href="dcs-api-0312045.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CopyInstance__section043910710592"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__request_BackupInstanceBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="CopyInstance__row1143911755919"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CopyInstance__p1644010713597">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CopyInstance__p15440197185920">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CopyInstance__p1944114712597">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CopyInstance__p444113711592">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row343918710594"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CopyInstance__p1044197125914">remark</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CopyInstance__p15442187155913">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CopyInstance__p94421178592">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CopyInstance__p204421765919">Description of DCS instance backup.</p>
</td>
</tr>
<tr id="CopyInstance__row194395705917"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CopyInstance__p1644310755920">backup_format</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CopyInstance__p154431973598">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CopyInstance__p194436775916">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CopyInstance__p344410715593">Format of the DCS instance backup.</p>
<p id="CopyInstance__p169691023145910">Enumeration values:</p>
<ul id="CopyInstance__ul2969132314592"><li id="CopyInstance__li129693237593"><strong id="CopyInstance__b69691323185912">aof</strong></li><li id="CopyInstance__li1196992345919"><strong id="CopyInstance__b396902315912">rdb</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CopyInstance__section844410717597"><h4 class="sectiontitle">Response Parameters</h4><p id="CopyInstance__p19444157155919"><strong id="CopyInstance__b1844587135911">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__response_BackupInstanceResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="CopyInstance__row84455713594"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CopyInstance__p11445877591">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CopyInstance__p2044617725919">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CopyInstance__p16446137105920">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row1244510775914"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CopyInstance__p134461271591">backup_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CopyInstance__p12447207185919">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CopyInstance__p14447177155912">Backup ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CopyInstance__p15447167115912"><strong id="CopyInstance__b4448147145918">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__response_ErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="CopyInstance__row64482745917"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="CopyInstance__p244812717595">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="CopyInstance__p744927135910">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="CopyInstance__p19449107105910">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row744812715596"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CopyInstance__p1450677590">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CopyInstance__p194501575596">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CopyInstance__p14519755916">Error message.</p>
</td>
</tr>
<tr id="CopyInstance__row044815718599"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CopyInstance__p14516755918">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CopyInstance__p1945119719598">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CopyInstance__p445207185913">Error code.</p>
</td>
</tr>
<tr id="CopyInstance__row34486735910"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CopyInstance__p11452207195919">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CopyInstance__p64538717591">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CopyInstance__p1345315712591">Extended error information. This parameter is not used currently and is set to <strong id="CopyInstance__b1445312718593">null</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CopyInstance__p24536705910"><strong id="CopyInstance__b174548713599">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__table8454670595" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="CopyInstance__row114541745917"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="CopyInstance__p7455273595">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="CopyInstance__p5455879597">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="CopyInstance__p145537125915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row1845416713599"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CopyInstance__p1456137175916">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CopyInstance__p1445612735916">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CopyInstance__p1045687105919">Error message.</p>
</td>
</tr>
<tr id="CopyInstance__row12454176591"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CopyInstance__p1545712745914">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CopyInstance__p74571470595">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CopyInstance__p1745757125913">Error code.</p>
</td>
</tr>
<tr id="CopyInstance__row745477135919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CopyInstance__p3458157105918">error_ext_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CopyInstance__p19458078593">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CopyInstance__p44584713596">Extended error information. This parameter is not used currently and is set to <strong id="CopyInstance__b945847175910">null</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CopyInstance__section1945915715919"><h4 class="sectiontitle">Example Requests</h4><p id="CopyInstance__p17459137175915">Backing up a specified DCS instance to an AOF file</p>
<pre class="screen" id="CopyInstance__screen84593718599">POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/backups
{
"remark" : "Backup instances",
"backup_format" : "aof"
}</pre>
</div>
<div class="section" id="CopyInstance__section1946137195912"><h4 class="sectiontitle">Example Responses</h4><p id="CopyInstance__p7462157185910"><strong id="CopyInstance__b846212712594">Status code: 200</strong></p>
<p id="CopyInstance__p44629719594">The specified DCS instance is backed up successfully.</p>
<pre class="screen" id="CopyInstance__screen164635715917">{
"backup_id" : "548ceeff-2cbb-47ab-9a1c-7b085a8c08d7"
}</pre>
</div>
<div class="section" id="CopyInstance__section194631713592"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CopyInstance__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CopyInstance__row8464276594"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CopyInstance__p74666715917">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CopyInstance__p15466177115919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CopyInstance__row1546420714592"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CopyInstance__p17467775590">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CopyInstance__p124671714599">The specified DCS instance is backed up successfully.</p>
</td>
</tr>
<tr id="CopyInstance__row2046414711597"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CopyInstance__p6468771596">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CopyInstance__p74689795918">Invalid request.</p>
</td>
</tr>
<tr id="CopyInstance__row046497205912"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CopyInstance__p64686745910">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CopyInstance__p946911785911">Internal service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CopyInstance__section12469167195916"><h4 class="sectiontitle">Error Codes</h4><p id="CopyInstance__p1646912755919">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="BackupRestoreManagement.html">Backup and Restoration</a></div>
</div>
</div>