forked from docs/doc-exports
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>
231 lines
17 KiB
HTML
231 lines
17 KiB
HTML
<a name="nosql_06_3002"></a><a name="nosql_06_3002"></a>
|
|
|
|
<h1 class="topictitle1">Querying an Automated Backup Policy</h1>
|
|
<div id="body0000002043666460"><div class="section" id="nosql_06_3002__section1110131104419"><h4 class="sectiontitle">Function</h4><p id="nosql_06_3002__p1511093112448">This API is used to query an automated backup policy.</p>
|
|
<div class="notice" id="nosql_06_3002__note194181317182"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="nosql_06_3002__p5418121714819">This API will be unavailable. You are advised to switch workloads to the new API described in <a href="nosql_api_0030.html">Querying an Automated Backup Policy</a>.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section1239972118494"><h4 class="sectiontitle">Constraints</h4><p id="nosql_06_3002__en-us_topic_0198711248_p3567737111013">This API can be used for GeminiDB Cassandra instances.</p>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section1011883104410"><h4 class="sectiontitle">URI</h4><p id="nosql_06_3002__p13118133110445">GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/backups/policy</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__table1712015315449" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="nosql_06_3002__row151191131174413"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="nosql_06_3002__p912023144413">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="nosql_06_3002__p31211931124410">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="nosql_06_3002__p151211531104415">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="nosql_06_3002__p412223184413">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row1111911315442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_06_3002__p111226315442">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_06_3002__p412313194418">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_06_3002__p19123123114414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_06_3002__p412413154420">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_06_3002__row5119531134419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_06_3002__p41241231154414">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_06_3002__p16124831194415">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_06_3002__p9125931164416">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_06_3002__p16125163110441">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__table871655832913" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query parameters</caption><thead align="left"><tr id="nosql_06_3002__row47811583292"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="nosql_06_3002__p1178125812291">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="nosql_06_3002__p10781205816294">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="nosql_06_3002__p378115818296">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="nosql_06_3002__p147811558182918">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row1278118587296"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="nosql_06_3002__p878175820299">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="nosql_06_3002__p187811158132917">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="nosql_06_3002__p4781155832911">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="nosql_06_3002__p207811158102913">Backup policy type. This parameter is available only to <span id="nosql_06_3002__text5778936484">GeminiDB Cassandra</span> API. The value can be:</p>
|
|
<ul id="nosql_06_3002__ul14781858152911"><li id="nosql_06_3002__li1578110589296"><strong id="nosql_06_3002__b440162674912">Instance</strong>: An instance backup is queried.</li><li id="nosql_06_3002__li1782195812292"><strong id="nosql_06_3002__b18222172194915">DatabaseTable</strong>: A database or table backup is queried.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section191261931184410"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="nosql_06_3002__row131291431134417"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="nosql_06_3002__p1130331144420">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="nosql_06_3002__p5130531114415">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="nosql_06_3002__p513143184411">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="nosql_06_3002__p113123110442">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row111291231124413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_06_3002__p181329315442">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="nosql_06_3002__p12132183114442">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_06_3002__p20133531144412">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_06_3002__p11133133104414">User token</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section6134031194418"><h4 class="sectiontitle">Response Parameters</h4><p id="nosql_06_3002__p1113413154414">Status code: 202</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__response_ShowBackupPolicyResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="nosql_06_3002__row21351931164410"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="nosql_06_3002__p10136113116443">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.3.2.4.1.2"><p id="nosql_06_3002__p11137203112443">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="nosql_06_3002__p15137731144413">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row191354310442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="nosql_06_3002__p81381231104415">backup_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.3.2.4.1.2 "><p id="nosql_06_3002__p2138103118441">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="nosql_06_3002__p131397319443">Backup policy objects, including the backup retention period (days) and start time. For details, see <a href="#nosql_06_3002__response_ShowBackupPolicyResult">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row2124183015313"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="nosql_06_3002__p311203753116">database_tables</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.3.2.4.1.2 "><p id="nosql_06_3002__p13112137153114">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="nosql_06_3002__p201121137193111">Database and table information in the backup. This parameter is available only to GeminiDB Cassandra API. For details, see <a href="#nosql_06_3002__table52261594347">Table 6</a>.</p>
|
|
<ul id="nosql_06_3002__ul71123379316"><li id="nosql_06_3002__li6112143710319">Keep this parameter empty or ignore it when you query an instance backup.</li><li id="nosql_06_3002__li411213718318">Remember to specify this parameter when you query a database or table backup (if any).</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="nosql_06_3002__response_ShowBackupPolicyResult"></a><a name="response_ShowBackupPolicyResult"></a><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__response_ShowBackupPolicyResult" frame="border" border="1" rules="all"><caption><b>Table 5 </b>ShowBackupPolicyResult</caption><thead align="left"><tr id="nosql_06_3002__row16139183118446"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="nosql_06_3002__p1714153124417">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.4.2.4.1.2"><p id="nosql_06_3002__p9141031134415">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.4.2.4.1.3"><p id="nosql_06_3002__p214283124418">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row91408310443"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="nosql_06_3002__p1142731134410">keep_days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.4.2.4.1.2 "><p id="nosql_06_3002__p14143153114448">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p id="nosql_06_3002__p614303144420">Backup retention days.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row162441559103016"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="nosql_06_3002__p96399211617">differential_period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.4.2.4.1.2 "><p id="nosql_06_3002__p1463922151613">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p id="nosql_06_3002__p1863916211163">Interval for automated differential backups. Its value can be <strong id="nosql_06_3002__b11395121074719">30</strong>, <strong id="nosql_06_3002__b18395910164714">60</strong>, <strong id="nosql_06_3002__b18395310114716">180</strong>, <strong id="nosql_06_3002__b3396141074712">360</strong>, <strong id="nosql_06_3002__b14396141024718">720</strong>, or <strong id="nosql_06_3002__b93961310204716">1440</strong>. The unit is minute. For example, the parameter is set to <strong id="nosql_06_3002__b1599575154314">30</strong>. If the value is <strong id="nosql_06_3002__b1660135814419">0</strong>, differential backup is disabled. Differential backup works based on incremental backup, and differential backup interval must be longer than incremental backup interval.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row34971727314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="nosql_06_3002__p106391721163">incremental_period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.4.2.4.1.2 "><p id="nosql_06_3002__p166395281610">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p id="nosql_06_3002__p2063916251611">Incremental backup interval, in minutes. If the value is <strong id="nosql_06_3002__b1719518390405">0</strong>, incremental backup is disabled.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row9140133112449"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="nosql_06_3002__p131459311442">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.4.2.4.1.2 "><p id="nosql_06_3002__p13145123194411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p id="nosql_06_3002__p1114653174416">Backup time window. Automated backup will be triggered during the backup time window.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row14140183114416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="nosql_06_3002__p71471431144415">period</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.4.2.4.1.2 "><p id="nosql_06_3002__p7147193119447">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p id="nosql_06_3002__p131478311444">Backup period. After a backup period is specified, data will be automatically backed up on the selected days every week.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="nosql_06_3002__table52261594347"></a><a name="table52261594347"></a><table cellpadding="4" cellspacing="0" summary="" id="nosql_06_3002__table52261594347" frame="border" border="1" rules="all"><caption><b>Table 6 </b>QueryDatabaseTableInfo</caption><thead align="left"><tr id="nosql_06_3002__row16295105910349"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="nosql_06_3002__p10295159153415">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.81%" id="mcps1.3.5.5.2.4.1.2"><p id="nosql_06_3002__p529505914340">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.19%" id="mcps1.3.5.5.2.4.1.3"><p id="nosql_06_3002__p8295165912342">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nosql_06_3002__row6295859173416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="nosql_06_3002__p4295115916345">database_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81%" headers="mcps1.3.5.5.2.4.1.2 "><p id="nosql_06_3002__p22951959163414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.19%" headers="mcps1.3.5.5.2.4.1.3 "><p id="nosql_06_3002__p4295195923417">Database name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nosql_06_3002__row152952591340"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="nosql_06_3002__p1429565916345">table_names</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81%" headers="mcps1.3.5.5.2.4.1.2 "><p id="nosql_06_3002__p1329555953414">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.19%" headers="mcps1.3.5.5.2.4.1.3 "><p id="nosql_06_3002__p3296359153411">Table names</p>
|
|
<ul id="nosql_06_3002__ul8296135923417"><li id="nosql_06_3002__li22961759123417">If this parameter is empty, database names are queried.</li><li id="nosql_06_3002__li4296115913416">If this parameter is not empty, table names are queried.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section514819315445"><h4 class="sectiontitle">Example Request</h4><div class="p" id="nosql_06_3002__p10888115813255">URI example<pre class="screen" id="nosql_06_3002__screen18653184385112">GET https://{Endpoint}/v3/375d8d8fad1f43039e23d3b6c0f60a19/instances/9136fd2a9fcd405ea4674276ce36dae8in02/backups/policy?type=Instance</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section1115173118442"><h4 class="sectiontitle">Example Response</h4><p id="nosql_06_3002__p015123112449">Status code: 202</p>
|
|
<p id="nosql_06_3002__p10151123120442">Success</p>
|
|
<p id="nosql_06_3002__p1577413414449">Response when an automated backup policy is enabled</p>
|
|
<pre class="screen" id="nosql_06_3002__screen13152163174419">{
|
|
"backup_policy" : {
|
|
"keep_days" : 7,
|
|
"start_time" : "19:00-20:00",
|
|
"period" : "1,2,4,5,6",
|
|
"incremental_period": "0",
|
|
"differential_period": "0"
|
|
},
|
|
"database_tables" : [ {
|
|
"database_name" : "databaseNameA",
|
|
"table_names" : [ "table_A", "table_B" ]
|
|
}, {
|
|
"database_name" : "databaseNameB",
|
|
"table_names" : null
|
|
} ]
|
|
}</pre>
|
|
<p id="nosql_06_3002__p2317417134618">Response when an automated backup policy is disabled</p>
|
|
<pre class="screen" id="nosql_06_3002__screen61551431174414"></pre>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section19107202213585"><h4 class="sectiontitle">Status Codes</h4><p id="nosql_06_3002__en-us_topic_0000001354223196_p201216122353">See <a href="nosql_status_code.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="nosql_06_3002__section21121922155813"><h4 class="sectiontitle">Error Codes</h4><p id="nosql_06_3002__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="nosql_06_3001.html">Backup and Restoration</a></div>
|
|
</div>
|
|
</div>
|
|
|