Description
You can call this operation to view restore tasks.
Call description
Prerequisites
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
GET /api/v2/ob/clusters/{id}/tenants/{tenantId}/backup/task/restoreTasks
Request parameters
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 1002 | The ID of the cluster. |
| tenantId | Integer | Yes | 108 | The ID of the tenant. |
Query parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| startTime | String | No | 2024-08-06T00:00:00Z | The start time. The value must be UTC time in the YYYY-MM-DDThh:mm:ssZ format. |
| endTime | String | No | 2024-08-07T00:00:00Z | The end time. The value must be UTC time in the YYYY-MM-DDThh:mm:ssZ format. |
| restoreClusterName | Array | No | ob_0807 | The list of names of the clusters to be restored. |
| status | Array | No | The task status. Valid values:
|
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | For more information, see Data structure of RestoreHistoryTask. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The 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 RestoreHistoryTask
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The ID of the restore task. |
| backupMode | String | The restore mode, which is the same as the backup mode. Valid values: LOGICAL_BACKUP: indicates logical backup.PHYSICAL_BACKUP: indicates physical backup. |
| triggerType | String | The trigger type, which is used to identify whether a task is a restore task or a sampling task. |
| createTime | String | The time when the task was created. |
| finishTime | String | The time when the task was completed. |
| backupClusterName | String | The name of the backed-up cluster. |
| backupTenantName | String | The name of the backed-up tenant. |
| backupObTenantId | Integer | The ID of the backed-up OceanBase Database tenant. |
| restoreClusterId | Integer | The ID of the restored cluster. |
| restoreClusterName | String | The name of the restored cluster. |
| restoreObClusterId | Integer | The ID of the restored OceanBase cluster. |
| restoreTenantName | String | The ID of the restored tenant. |
| restorePoolListStr | String | The list of restored resource pools separated with commas (,). |
| restoreUri | String | The backup directory. |
| restoreEndTime | String | The restore end time. |
| status | String | The restore status. |
| statusDesc | String | The description of the restore status. |
| progress | String | The restore progress. During logical backup and restore, the restore progress cannot be returned for baseline restore and the value of this parameter is checkpoint for incremental restore. |
| errorMsg | String | The error message. |
Examples
Sample request
GET /api/v2/ob/clusters/1000005/tenants/1000012/backup/task/restoreTasks?page=1&size=10
Sample response
{
"data": {
"contents": [
{
"backupClusterName": "ob_431",
"backupMode": "PHYSICAL_BACKUP",
"backupObTenantId": 1014,
"backupTenantName": "aiso",
"createTime": "2024-08-08T08:25:39.150608Z",
"errorMsg": "",
"finishTime": "2024-08-08T08:29:50.749986Z",
"finished": true,
"id": 2,
"restoreClusterId": 1000005,
"restoreClusterName": "ob_431",
"restoreEndTime": "2024-08-08T08:23:57.422347Z",
"restoreObClusterId": 199,
"restoreObjectType": "TENANT",
"restorePoolListStr": "pool_zhengzhou_zone1_qhi",
"restoreTenantName": "zhengzhou",
"restoreUri": "file:///obbackup/ob_431/199/tenant_incarnation_1/1014/clog,file:///obbackup/ob_431/199/tenant_incarnation_1/1014/data",
"status": "RESTORE_SUCCESS",
"statusDesc": "Completed",
"successful": true,
"triggerType": "NORMAL"
},
{
"backupClusterName": "ob_431",
"backupMode": "PHYSICAL_BACKUP",
"backupObTenantId": 1002,
"backupTenantName": "ob_431_tenant",
"createTime": "2024-08-08T07:57:33.103869Z",
"errorMsg": "",
"finishTime": "2024-08-08T08:01:36.103798Z",
"finished": true,
"id": 1,
"restoreClusterId": 283,
"restoreClusterName": "ob_431",
"restoreEndTime": "2024-08-08T07:56:41.851284Z",
"restoreObClusterId": 199,
"restoreObjectType": "TENANT",
"restorePoolListStr": "pool_aiso_zone1_txx",
"restoreTenantName": "aiso",
"restoreUri": "file:///obbackup/ob_431/199/tenant_incarnation_1/1002/clog,file:///obbackup/ob_431/199/tenant_incarnation_1/1002/data",
"status": "RESTORE_SUCCESS",
"statusDesc": "Completed",
"successful": true,
"triggerType": "NORMAL"
}
],
"page": {
"number": 1,
"size": 10,
"totalElements": 2,
"totalPages": 1
}
},
"duration": 169,
"server": "a24d13ce67",
"status": 200,
"successful": true,
"timestamp": "2024-08-09T15:47:50.451+08:00",
"traceId": "57a90c3ab3b89b93"
}