forked from docs/doc-exports
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
220 lines
18 KiB
HTML
220 lines
18 KiB
HTML
<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 supports 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>Path 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 parameters</caption><thead align="left"><tr id="nosql_api_0031__row192281831134418"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="nosql_api_0031__p1822920314445">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__p1223093194417">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__p14230103154417">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__p13231163110440">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="nosql_api_0031__row62281731154412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_api_0031__p12671152143311">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__p19232153110448">Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_api_0031__p2233153118447">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_api_0031__p14233631164411">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 parameters</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>
|
||
<tr id="nosql_api_0031__row106183464320"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_api_0031__p144921437104313">database_tables</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_api_0031__p9492163715435">No</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_api_0031__p5492137124313">Array of objects</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_api_0031__p184921037104311">Database and table information in the backup policy. This parameter is available only to GeminiDB Cassandra. For details, see <a href="#nosql_api_0031__table53208596452">Table 5</a>.</p>
|
||
<ul id="nosql_api_0031__ul164921637144319"><li id="nosql_api_0031__li20492103754316">If this parameter is empty, an automated backup policy for an instance is set.</li><li id="nosql_api_0031__li1049233717433">If this parameter is not empty, an automated backup policy for a databases or table is set.</li></ul>
|
||
</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:00–00: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 class="tablenoborder"><a name="nosql_api_0031__table53208596452"></a><a name="table53208596452"></a><table cellpadding="4" cellspacing="0" summary="" id="nosql_api_0031__table53208596452" frame="border" border="1" rules="all"><caption><b>Table 5 </b>PutDatabaseTablePolicy</caption><thead align="left"><tr id="nosql_api_0031__row17364859134520"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.1"><p id="nosql_api_0031__p103641659144519">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.2"><p id="nosql_api_0031__p14364155934511">Mandatory</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.3"><p id="nosql_api_0031__p153644597453">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.5.2.5.1.4"><p id="nosql_api_0031__p13641959144518">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="nosql_api_0031__row1836425924517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="nosql_api_0031__p113641559104514">database_name</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="nosql_api_0031__p203651959104512">Yes</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="nosql_api_0031__p16365159184511">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="nosql_api_0031__p20365125919459">Database name.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="nosql_api_0031__row1436512597454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="nosql_api_0031__p63656593451">table_names</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="nosql_api_0031__p1365185916457">No</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="nosql_api_0031__p03651959104515">Array of strings</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="nosql_api_0031__p336515599459">Table names.</p>
|
||
<ul id="nosql_api_0031__ul93651559164512"><li id="nosql_api_0031__li153651959184515">If this parameter is empty, a backup policy for an instance is set.</li><li id="nosql_api_0031__li173655597454">If this parameter is not empty, a backup policy for a databases or table is set.</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"><strong id="nosql_api_0031__b19910210153211">Status code: 204</strong></p>
|
||
<p id="nosql_api_0031__p72575313447">No response parameters</p>
|
||
</div>
|
||
<div class="section" id="nosql_api_0031__section1125813317446"><h4 class="sectiontitle">Example Requests</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__screen1726203119445">{
|
||
"backup_policy" : {
|
||
"keep_days" : 7,
|
||
"start_time" : "01:00-02:00",
|
||
"period" : "1,2,3,4,5,6"
|
||
},
|
||
"database_tables" : [ {
|
||
"database_name" : "databaseNameA",
|
||
"table_names" : [ "table_A", "table_B" ]
|
||
}, {
|
||
"database_name" : "databaseNameB",
|
||
"table_names" : null
|
||
} ]
|
||
}</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 Responses</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__listapiversion_p201216122353">For details, 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__listapiversion_p1265915205719">For details, 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>
|
||
|