Files
doc-exports/docs/geminidb/api-ref/nosql_api_0031.html
wangdengke2 8d0926f0e5 geminidb_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2025-09-04 07:22:35 +00:00

179 lines
16 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="nosql_api_0031"></a><a name="nosql_api_0031"></a>
<h1 class="topictitle1">Configuring an Automated Backup Policy</h1>
<div id="body1213163117446"><div class="section" id="nosql_api_0031__section1221311319442"><h4 class="sectiontitle">Function</h4><p id="nosql_api_0031__p14213173118445">This API is used to configuring an automated backup policy.</p>
</div>
<div class="section" id="nosql_api_0031__section1239972118494"><h4 class="sectiontitle">Constraints</h4><p id="nosql_api_0031__p198141612121118">This API can be used for GeminiDB Cassandra instances.</p>
</div>
<div class="section" id="nosql_api_0031__section12218143194417"><h4 class="sectiontitle">URI</h4><p id="nosql_api_0031__p192181231114416">PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/backups/policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_api_0031__table922043124411" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="nosql_api_0031__row72191931194413"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="nosql_api_0031__p202201731154412">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="nosql_api_0031__p11221193134412">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="nosql_api_0031__p422263119449">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="nosql_api_0031__p20222331164416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_api_0031__row1521910317442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_api_0031__p1422303184417">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_api_0031__p16224153194415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_api_0031__p9224163118446">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_api_0031__p722513316446">Project ID of a tenant in a region. To obtain this value, see <a href="nosql_projectid.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="nosql_api_0031__row12219133117443"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_api_0031__p9225133112444">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_api_0031__p13226231174419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_api_0031__p1322611310442">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_api_0031__p12271311445">Instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_api_0031__section20227163111444"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_api_0031__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameter</caption><thead align="left"><tr id="nosql_api_0031__nosql_06_0002_row12368317383"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="nosql_api_0031__nosql_06_0002_p936941712818">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="nosql_api_0031__nosql_06_0002_p2369717883">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="nosql_api_0031__nosql_06_0002_p93709171881">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="nosql_api_0031__nosql_06_0002_p1937018171381">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_api_0031__nosql_06_0002_row1896919103549"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_api_0031__nosql_06_0002_p047832135015">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="nosql_api_0031__nosql_06_0002_p34785216504">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_api_0031__nosql_06_0002_p082192665218">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_api_0031__nosql_06_0002_en-us_topic_0121682347_p1486815116337">MIME type of the request body. <strong id="nosql_api_0031__nosql_06_0002_b1528010571035">application/json</strong> is recommended.</p>
</td>
</tr>
<tr id="nosql_api_0031__nosql_06_0002_row163681217987"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_api_0031__nosql_06_0002_p1937017171284">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="nosql_api_0031__nosql_06_0002_p15371517489">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_api_0031__nosql_06_0002_p1437119171810">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_api_0031__nosql_06_0002_p1237131714819">User token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_api_0031__request_SetBackupPolicyRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameter</caption><thead align="left"><tr id="nosql_api_0031__row1234331184419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="nosql_api_0031__p9235153113444">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="nosql_api_0031__p423543174415">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="nosql_api_0031__p7236831124411">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="nosql_api_0031__p172371731144413">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_api_0031__row16234531184419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_api_0031__p8238031144419">backup_policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_api_0031__p42391031114419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_api_0031__p8239031104411">object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_api_0031__p724017319440">Backup policy objects, including backup retention period (days) and start time For details, see <a href="#nosql_api_0031__request_BackupPolicy">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="nosql_api_0031__request_BackupPolicy"></a><a name="request_BackupPolicy"></a><table cellpadding="4" cellspacing="0" summary="" id="nosql_api_0031__request_BackupPolicy" frame="border" border="1" rules="all"><caption><b>Table 4 </b>BackupPolicy</caption><thead align="left"><tr id="nosql_api_0031__row142411231174410"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="nosql_api_0031__p52432312446">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="nosql_api_0031__p10243153119446">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="nosql_api_0031__p1724453104412">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="nosql_api_0031__p182441631164418">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_api_0031__row424117317442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_api_0031__p2245123194418">keep_days</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_api_0031__p0245143184414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_api_0031__p524653113441">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_api_0031__p152461331204420">Backup retention days.</p>
<p id="nosql_api_0031__p1724773118447">The value ranges from <strong id="nosql_api_0031__b12729171310582">0</strong> to <strong id="nosql_api_0031__b339661510582">35</strong>. The value <strong id="nosql_api_0031__b19551209105816">0</strong> indicates that the automated backup policy is disabled.</p>
</td>
</tr>
<tr id="nosql_api_0031__row1124116311445"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_api_0031__p324718315442">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_api_0031__p19248231124411">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_api_0031__p224817318442">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_api_0031__p724983112448">Backup time window. Automated backup will be triggered during the backup time window. This parameter is mandatory if the automated backup policy is enabled. If the policy is disabled, you do not need to transfer this parameter.</p>
<p id="nosql_api_0031__p02491031164413">The value must be the UTC time in the hh:mm-HH:MM format.</p>
<ul id="nosql_api_0031__ul424919310443"><li id="nosql_api_0031__li10250153111443">The <strong id="nosql_api_0031__b6434157125918">HH</strong> value must be 1 greater than the <strong id="nosql_api_0031__b1043815710594">hh</strong> value.</li><li id="nosql_api_0031__li6250193164419">The values of <strong id="nosql_api_0031__b6144131574910">mm</strong> and <strong id="nosql_api_0031__b1914591594916">MM</strong> must be the same and must be set to <strong id="nosql_api_0031__b61455157490">00</strong>, <strong id="nosql_api_0031__b1146815114914">15</strong>, <strong id="nosql_api_0031__b131461415194919">30</strong>, or <strong id="nosql_api_0031__b18146115134918">45</strong>.</li><li id="nosql_api_0031__li122514319441">Example value: <strong id="nosql_api_0031__b2058074851416">23:0000:00</strong></li></ul>
</td>
</tr>
<tr id="nosql_api_0031__row11241031154410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_api_0031__p12252133120447">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_api_0031__p122521531104414">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_api_0031__p2025393124410">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_api_0031__p4254153112445">Backup period. After a backup period is specified, data will be automatically backed up on the selected days every week. This parameter is mandatory if the automated backup policy is enabled. If the policy is disabled, you do not need to transfer this parameter.</p>
<p id="nosql_api_0031__p02541531114417">The value is a list of digits separated by commas (,). Each digit indicates a day of the week. The restrictions on the backup period are as follows:</p>
<ul id="nosql_api_0031__ul2254173114446"><li id="nosql_api_0031__li1925511318442">If you set <strong id="nosql_api_0031__b124185011399">keep_days</strong> to <strong id="nosql_api_0031__b11279159551">0</strong>, this parameter is not transferred.</li><li id="nosql_api_0031__li132557317446">If you set <strong id="nosql_api_0031__b208978512207">keep_days</strong> to <strong id="nosql_api_0031__b460614594208">1</strong> to <strong id="nosql_api_0031__b372713111215">6</strong>, set this parameter to <strong id="nosql_api_0031__b1318855241211">1, 2, 3, 4, 5, 6, 7.</strong></li><li id="nosql_api_0031__li32566319440">If you set <strong id="nosql_api_0031__b1269212528234">keep_days</strong> to <strong id="nosql_api_0031__b369225217235">7</strong> to <strong id="nosql_api_0031__b8693852162310">35</strong>, select at least one day of the week for the backup cycle. Example value: <strong id="nosql_api_0031__b201679531347">1,2,3,4</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_api_0031__section182561031114414"><h4 class="sectiontitle">Response Parameters</h4><p id="nosql_api_0031__p172245373812">Status code: 204</p>
<p id="nosql_api_0031__p72575313447">None</p>
</div>
<div class="section" id="nosql_api_0031__section1125813317446"><h4 class="sectiontitle">Example Request</h4><ul id="nosql_api_0031__ul1925853144416"><li id="nosql_api_0031__li036101535414">URI example<pre class="screen" id="nosql_api_0031__screen2037111575420">PUT https://{Endpoint}/v3/375d8d8fad1f43039e23d3b6c0f60a19/instances/9136fd2a9fcd405ea4674276ce36dae8in02/backups/policy</pre>
</li><li id="nosql_api_0031__li12261331134412">Example request body<p id="nosql_api_0031__p1326111318442"><a name="nosql_api_0031__li12261331134412"></a><a name="li12261331134412"></a>Enabling or modifying the automated backup policy (Set <strong id="nosql_api_0031__b318843651819">period</strong> to <strong id="nosql_api_0031__b13895104151816">1</strong>, <strong id="nosql_api_0031__b2284145121814">2</strong>, <strong id="nosql_api_0031__b1280164716180">3</strong>, <strong id="nosql_api_0031__b320815316185">4</strong>, <strong id="nosql_api_0031__b76801455111814">5</strong>, and <strong id="nosql_api_0031__b1532385831816">6</strong>, <strong id="nosql_api_0031__b19721198161915">start_time</strong> to <strong id="nosql_api_0031__b74581912111910">01:00-02:00</strong>, and <strong id="nosql_api_0031__b113615242195">keep_days</strong> to <strong id="nosql_api_0031__b1687913277193">7</strong>.)</p>
<pre class="screen" id="nosql_api_0031__screen7791152034012">{
"backup_policy" : {
"keep_days" : 7,
"start_time" : "01:00-02:00",
"period" : "1,2,3,4,5,6"
}
}</pre>
<p id="nosql_api_0031__p2026593174417">Disabling automated backup</p>
<pre class="screen" id="nosql_api_0031__screen3266131164412">{
"backup_policy" : {
"keep_days" : 0
}
}</pre>
</li></ul>
</div>
<div class="section" id="nosql_api_0031__section626816314447"><h4 class="sectiontitle">Example Response</h4><p id="nosql_api_0031__p1726923111444"><strong id="nosql_api_0031__b216611531614">Status code: 204</strong></p>
<p id="nosql_api_0031__p162693312443">No Content</p>
<pre class="screen" id="nosql_api_0031__screen16270131154415">{ }</pre>
</div>
<div class="section" id="nosql_api_0031__section19107202213585"><h4 class="sectiontitle">Status Codes</h4><p id="nosql_api_0031__en-us_topic_0000001354223196_p201216122353">See <a href="nosql_status_code.html">Status Codes</a>.</p>
</div>
<div class="section" id="nosql_api_0031__section21121922155813"><h4 class="sectiontitle">Error Codes</h4><p id="nosql_api_0031__en-us_topic_0000001354223196_p1265915205719">See <a href="nosql_error_code.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000003.html">Backups and Restorations</a></div>
</div>
</div>