Description
You can call this operation to query the backup strategy of an OceanBase cluster.
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/config/backupStrategy
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 strategy. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information about the backup strategy, see Data structure of OcpBackupStrategy . |
| 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 OcpBackupStrategy
| Parameter | Type | Description |
|---|---|---|
| id | Long | The ID of the strategy. |
| createTime | Date | The creation time. |
| updateTime | Date | The update time. |
| clusterName | String | The name of the cluster. |
| obClusterId | Long | The ID of the OceanBase cluster. |
| clusterId | Long | The ID of the cluster. |
| backupDimension | String | The backup dimension. Valid values: CLUSTER and TENANT. Only cluster backup is supported. |
| tenantName | String | The name of the tenant. |
| obTenantId | Long | The ID of the OceanBase Database tenant. |
| tenantId | Long | The tenant ID in OCP. |
| type | String | The backup type. Valid values: BACKUP and SECONDARY_BACKUP . |
| obBackupServiceStorageConfig | Object | The backup storage configuration. For more information, see Data structure of ObBackupServiceStorageConfig in Create a backup strategy for a cluster. |
| backupMode | String | The backup mode. Valid values: LOGICAL_BACKUP and PHYSICAL_BACKUP . |
| serviceConfigName | String | The name of the service configuration. |
| obBackupScheduleConfig | Object | The backup scheduling configuration. For more information, see Data structure of obBackupScheduleConfig in Create a backup strategy for a cluster. |
Examples
Sample request
Query the backup strategy for the OceanBase cluster with the ID of 1.
GET /api/v2/ob/clusters/1/backup/config/backupStrategy
Sample response
{
"data":{
"contents":[
{
"alarmSummaries":[
{
"count":0,
"level":1,
"linkDataUrl":"http://xxx.xxx.xxx.xxx:8080/api/v2/alarm/alarms?isSubscribedByMe=false&page=1&size=10&level=1&category=OB&status=Active&obCluster=test",
"linkUrl":"http://xxx.xxx.xxx.xxx:8080/alarm/event?isSubscribedByMe=false&page=1&size=10&level=1&category=OB&status=Active&obCluster=test"
},
{
"count":0,
"level":2,
"linkDataUrl":"http://xxx.xxx.xxx.xxx:8080/api/v2/alarm/alarms?isSubscribedByMe=false&page=1&size=10&level=2&category=OB&status=Active&obCluster=test",
"linkUrl":"http://xxx.xxx.xxx.xxx:8080/alarm/event?isSubscribedByMe=false&page=1&size=10&level=2&category=OB&status=Active&obCluster=test"
},
{
"count":0,
"level":3,
"linkDataUrl":"http://xxx.xxx.xxx.xxx:8080/api/v2/alarm/alarms?isSubscribedByMe=false&page=1&size=10&level=3&category=OB&status=Active&obCluster=test",
"linkUrl":"http://xxx.xxx.xxx.xxx:8080/alarm/event?isSubscribedByMe=false&page=1&size=10&level=3&category=OB&status=Active&obCluster=test"
},
{
"count":0,
"level":4,
"linkDataUrl":"http://xxx.xxx.xxx.xxx:8080/api/v2/alarm/alarms?isSubscribedByMe=false&page=1&size=10&level=4&category=OB&status=Active&obCluster=test",
"linkUrl":"http://xxx.xxx.xxx.xxx:8080/alarm/event?isSubscribedByMe=false&page=1&size=10&level=4&category=OB&status=Active&obCluster=test"
},
{
"count":0,
"level":5,
"linkDataUrl":"http://xxx.xxx.xxx.xxx:8080/api/v2/alarm/alarms?isSubscribedByMe=false&page=1&size=10&level=5&category=OB&status=Active&obCluster=test",
"linkUrl":"http://xxx.xxx.xxx.xxx:8080/alarm/event?isSubscribedByMe=false&page=1&size=10&level=5&category=OB&status=Active&obCluster=test"
}
],
"createTime":"2020-11-29T22:23:12+08:00",
"creator":"admin",
"id":1000002,
"name":"test",
"obClusterId":4,
"obVersion":"2.2.73",
"regionCount":1,
"rootServers":[
{
"address":"xxx.xxx.xxx.xxx:2882",
"role":"LEADER",
"sql_port":2881
}
],
"serverCount":1,
"standbyClusters":[
],
"status":"RUNNING",
"tenantCount":0,
"type":"PRIMARY",
"zones":[
{
"idcId":1,
"idcName":"hz",
"innerStatus":"ACTIVE",
"name":"zone1",
"operateStatus":"NORMAL",
"regionName":"hz",
"serverCount":1,
"servers":[
],
"status":"RUNNING"
}
]
}
],
"page":{
"number":1,
"size":10,
"totalElements":1,
"totalPages":1
}
},
"duration":108,
"server": "a83ad33525",
"status":200,
"successful":true,
"timestamp":"2020-12-02T20:03:58.233+08:00",
"traceId":"3cfec9a5180748ff"
}