首批通过分布式安全可靠测评,为关键业务系统打造
解析租户备份信息
更新时间:2026-04-14 15:11:03
功能说明
该接口用于解析租户备份信息。
调用说明
接口约束
调用者需要通过 OCP 应用服务鉴权。
请求路径
GET /api/v2/ob/clusters/{id}/tenants/{tenantId}/backup/info
请求参数
Path 参数
| 参数 | 类型 | 必选 | 示例值 | 描述 |
|---|---|---|---|---|
| id | Integer | 是 | 1002 | 集群 ID。 |
| tenantId | Integer | 是 | 108 | 租户 ID。 |
Query 参数
| 参数 | 类型 | 必选 | 示例值 | 描述 |
|---|---|---|---|---|
| startTime | String | 否 | 2024-08-06T00:00:00Z | 开始时间,该时间只支持 UTC 时间,格式为:YYYY-MM-DDThh:mm:ssZ。 |
| endTime | String | 否 | 2024-08-07T00:00:00Z | 结束时间,该时间只支持 UTC 时间,格式为:YYYY-MM-DDThh:mm:ssZ。 |
返回结果
基础数据结构
| 参数 | 类型 | 说明 |
|---|---|---|
| data | Object | 详情参见 ObTenantBackupInfo 的数据结构 。 |
| successful | Boolean | 请求是否成功。 |
| timestamp | Datetime | 服务端完成请求的时间戳。 |
| duration | Integer | 服务端处理请求的时间(毫秒)。 |
| status | Integer | 符合 HTTP Status 规范的编码。 |
| traceId | String | 请求的 Trace ID,用于排查问题。 |
| server | String | 响应请求的应用服务的地址。 |
ObTenantBackupInfo 的数据结构
| 参数 | 类型 | 说明 |
|---|---|---|
| clusterName | String | 集群名。 |
| obClusterId | Integer | OceanBase 集群 ID。 |
| clusterId | Integer | 集群 ID。 |
| obTenantId | Integer | OceanBase 租户 ID。 |
| tenantId | Integer | 租户 ID。 |
| tenantName | String | 租户名。 |
| online | Boolean | 是否在线。 |
| obRecoverableInfoAggregation | ObRecoverableInfoAggregation | 可恢复时间区间,详情参见 ObRecoverableInfoAggregation 的数据结构 。 |
ObRecoverableInfoAggregation 的数据结构
| 参数 | 类型 | 说明 |
|---|---|---|
| obQueryTimeScopeType | String | 查询时间范围类型,目前主要用于可恢复区间和存储趋势。 |
| latestSevenDaysAggregation | LatestSevenDaysAggregation | 最近一定天数的可恢复数据的聚合集合,详情参见 LatestSevenDaysAggregation 的数据结构 。 |
LatestSevenDaysAggregation 的数据结构
| 参数 | 类型 | 说明 |
|---|---|---|
| obRecoverableSectionItems | Array | 可恢复时间区间列表。 |
| |----obRecoverableSectionItemType | String | 可恢复时间区间中的结点类型,包括: |
| |--backupDimension | String | 备份维度,如 CLUSTER 代表集群备份,TENANT 代表租户备份。 |
| |----backupMode | String | 备份方式,包括: |
| |----dataBackupRecoverableInfo | Object | 数据备份的可恢复信息,只在结点类型为 全量数据备份 和 增量数据备份 时有效。 |
| |----freezeTime | OffsetDateTime | 数据备份对应的冻结时间。 |
| |----recoverableTime | OffsetDateTime | 数据备份的可恢复时间。 |
| |----dataVersion | Long | 数据版本。 |
| |----fullBackupSetId | Long | 全量备份集 ID,用于标记物理备份中全量数据备份与增量数据备份的关系,ID 相同的全量备份与增量备份是对应的。 |
| |----logRecoverableTimeInterval | Object | 日志备份的时间区间,只在结点类型为 日志备份 时有效。 |
| |----startTime | OffsetDateTime | 起始时间。 |
| |----endTime | OffsetDateTime | 结束时间。 |
| |----realRecoverableTimeInterval | Object | 真正的可恢复时间区间,只在结点类型为 可恢复时间 时有效。 |
| |----startTime | OffsetDateTime | 起始时间。 |
| |----endTime | OffsetDateTime | 结束时间。 |
示例
请求示例
GET /api/v2/ob/clusters/1000005/tenants/1000012/backup/info
返回示例
{
"data": {
"clusterId": 1000005,
"clusterName": "ob4210",
"obClusterId": 1658110539,
"obRecoverableInfoAggregation": {
"latestSevenDaysAggregation": {
"obRecoverableSectionItems": [
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 1,
"recoverableTime": "2024-08-02T16:01:41.862678516+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 2,
"recoverableTime": "2024-08-03T04:02:20.132919855+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupDimension": "CLUSTER",
"backupMode": "PHYSICAL_BACKUP",
"dataBackupRecoverableInfo": {
"dataVersion": -1,
"freezeTime": "1970-01-01T08:00:00+08:00",
"fullBackupSetId": 3,
"recoverableTime": "2024-08-06T04:02:41.523113062+08:00"
},
"obRecoverableSectionItemType": "FULL_DATA_BACKUP"
},
{
"backupMode": "PHYSICAL_BACKUP",
"logRecoverableTimeInterval": {
"endTime": "2024-08-07T10:29:03.21621827+08:00",
"startTime": "2024-08-02T15:58:40.936369856+08:00"
},
"obRecoverableSectionItemType": "LOG_BACKUP"
},
{
"backupMode": "PHYSICAL_BACKUP",
"obRecoverableSectionItemType": "RECOVERABLE",
"realRecoverableTimeInterval": {
"endTime": "2024-08-07T10:29:03.21621827+08:00",
"startTime": "2024-08-02T16:01:41.862678516+08:00"
}
}
]
},
"obQueryTimeScopeType": "LATEST_SEVEN_DAYS"
},
"obTenantId": 1004,
"online": true,
"tenantId": 1000012,
"tenantName": "tenantA"
},
"duration": 1332,
"server": "74f95ea2f4",
"status": 200,
"successful": true,
"timestamp": "2024-08-07T11:29:56.261+08:00",
"traceId": "c7c25af8e9689c09"
}