Description
You can call this operation to query the backup capabilities of an OceanBase cluster, including whether the cluster can be backed up and the supported backup methods.
Call description
Prerequisites
You have the Read-only permission on cluster backup and recovery.
You have passed the authentication for the OCP application service.
Request path
GET /api/v2/ob/clusters/{id}/backup/ability
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1001 | The ID of the cluster for which you want to query the backup capabilities. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object | The ObBackupAbility parameter. For more information about the data structure and parameter description, see Data structure of ObBackupAbility . |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Data structure of ObBackupAbility
| Parameter | Type | Description |
|---|---|---|
| backupAbility | String | The supported backup capabilities. Valid values: * LOGICAL_BACKUP * PHYSICAL_BACKUP * LOGICAL_AND_PHYSICAL |
| backupMode | String | The backup method. Valid values: * LOGICAL_BACKUP * PHYSICAL_BACKUP |
| obDataBackupSupportAbility | Object | The capabilities supported by the OceanBase data backup service, which are described in details in the following three cells. |
| |--fullBackupEnabled | Boolean | Indicates whether full backup was supported by the cluster. |
| |--incrementBackupEnabled | Boolean | Indicates whether incremental backup was supported by the cluster. |
| |--canDoIncrementalBackup | Boolean | Indicates whether incremental backup can be carried out on the cluster. |
| |--hint | String | The prompt information. |
| obBackupCondition | Object | The conditions for backup and recovery, which are described in details in the following three cells. |
| |--needAgentToBackup | Boolean | Indicates whether the backup agent was required for backup. |
| |--needAgentToRestore | Boolean | Indicates whether the recovery agent was required for recovery. |
| |--agentMetaDbSchema | String | The name of the MetaDB of the backup agent. |
| obRestoreConditionCheckResult | Object | The condition check results for recovery, which are described in details in the following cells. |
| |--backupTaskType | String | The type of the backup task. |
| |--beReady | Boolean | Indicates whether backup can be performed. |
| |--needDependentOnAgents | String | Indicates whether the backup agent was required for backup. |
| |--serviceNameList | List<String> | The corresponding backup and recovery service names when the backup agent was required for backup. |
| |--agentMetaDbSchema | String | The schema of the MetaDB. |
| |--errorCodes | String | The error code. |
| |--hint | String | The prompt information. |
Examples
Sample request
Query the backup capabilities of a cluster.
Sample response
{
"data": {
"backupAbility": "PHYSICAL_BACKUP",
"backupMode": "PHYSICAL_BACKUP",
"obDataBackupSupportAbility": {
"canDoIncrementalBackup": false,
"fullBackupEnabled": true,
"hint": "During a physical backup, you must perform a full backup before you can perform an incremental backup.",
"incrementBackupEnabled": true
}
},
"duration": 22,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-23T15:31:29.276+08:00",
"traceId": "45d27e7dc09b4ca9"
}