機能の概要
このAPIは、特定のクラスタのリストアタスクを照会するために使用されます。
呼び出しの説明
インターフェース制約
呼び出し元は、少なくともそのクラスタのバックアップ・リストアに対する読み取り専用権限を持っている必要があります。
呼び出し元は、OCPアプリケーションサービスの認証を通過している必要があります。
リクエストパス
GET /api/v2/ob/clusters/{id}/backup/task/restoreTasks
リクエストパラメータ
パラメータ |
型 |
必須 |
サンプル値 |
説明 |
|---|---|---|---|---|
| id | Long | はい | 1 | クラスタID |
| startTime | OffsetDateTime | いいえ | 2021-09-16T15:14:51.397+08:00 | 時間範囲の開始時刻 |
| endTime | OffsetDateTime | いいえ | 2021-09-16T15:20:51.397+08:00 | 時間範囲の終了時刻 |
| page | Long | はい | 1 | 照会するタスクのページ番号。 |
| size | Long | はい | 10 | 1ページあたりに表示するタスク数。 |
戻り値
パラメータ |
型 |
説明 |
|---|---|---|
| data | Object | リクエストされたデータ。 |
| ├─ contents | Array | RestoreHistoryTaskの配列。詳細なデータ構造については、RestoreHistoryTaskのデータ構造 を参照してください。 |
| ├─ page | Object | ページ情報。 |
| ├─ totalElements | Integer | 総レコード数。 |
| ├─ totalPages | Integer | 総ページ数。 |
| ├─ number | Integer | 現在のページ番号。 |
| ├─ size | Integer | 現在のページサイズ。 |
| successful | Boolean | リクエストが成功したかどうか。 |
| timestamp | Datetime | サーバーがリクエストを完了したタイムスタンプ。 |
| duration | Integer | サーバーがリクエストを処理した時間(ミリ秒)。 |
| status | Integer | HTTPステータスコード。 |
| traceId | String | リクエストのTrace Id。問題のトラブルシューティングに使用されます。 |
| server | String | リクエストに応答したアプリケーションサービスのアドレス。 |
RestoreHistoryTaskのデータ構造
パラメータ |
型 |
説明 |
|---|---|---|
| id | Long | リストアタスクID。 |
| ocpJobId | Long | リストアタスクの外部番号。OCPから発行されます。物理リストアタスクを抽出検査する場合にのみ、この値は0より大きくなります。 |
| backupMode | String | 復元モード。バックアップモードのフィールドを再利用します。論理復元または物理復元が含まれます。 |
| createTime | Timestamp | 作成時間。 |
| finishTime | Timestamp | 完了時間。 |
| backupClusterId | Long | バックアップクラスタID。 |
| backupClusterName | String | バックアップクラスタ名。 |
| backupObClusterId | Long | バックアップクラスタID (OceanBase側)。 |
| backupObTenantId | Long | バックアップテナントID (OceanBase側)。 |
| backupTenantId | Long | バックアップテナントID。 |
| backupTenantName | String | バックアップテナント名。 |
| restoreClusterName | String | 復元クラスタ名。 |
| restoreObClusterId | Long | 復元クラスタID (OceanBase側)。 |
| restoreClusterId | Long | 復元クラスタID。 |
| restoreTenantName | String | 復元テナント名。 |
| restorePoolListStr | String | 復元リソースプールリスト。複数のリソースプールは、カンマで区切ります。 |
| restoreUri | String | バックアップディレクトリ。 |
| restoreEndTime | Timestamp | 復元時間。 |
| status | String | 復元状態。 |
| errorMsg | String | エラーメッセージ。 |
例
リクエスト例
GET api/v2/ob/clusters/1000005/backup/task/restoreTasks?page=1&size=10
レスポンス例
{
"data": {
"contents": [
{
"backupClusterId": 1000005,
"backupClusterName": "yc0820_17",
"backupMode": "PHYSICAL_BACKUP",
"backupObClusterId": 5,
"backupObTenantId": 1001,
"backupTenantId": 1000012,
"backupTenantName": "yctest",
"createTime": "2021-09-09T18:32:18.833+0800",
"errorMsg": "CLOG : OB_ENTRY_NOT_EXIST(-4018) on \"xxx.xxx.xxx.xxx:2882\" with traceid YB42AC1E55AC-0005CB53B2946DFF",
"finishTime": "2021-09-09T18:32:20.066+0800",
"finished": true,
"id": 4,
"ocpJobId": -1,
"restoreClusterId": 1000005,
"restoreClusterName": "yc0820_17",
"restoreEndTime": "2021-09-09T17:19:00.000+0800",
"restoreObClusterId": 5,
"restorePoolListStr": "pool_restoretest_zone1_oqy",
"restoreTenantName": "restoretest",
"restoreUri": "file:///obbackup/backup_backup2",
"status": "RESTORE_FAIL",
"statusDesc": "失败",
"successful": false
},
{
"backupClusterId": 1000005,
"backupClusterName": "yc0820_17",
"backupMode": "PHYSICAL_BACKUP",
"backupObClusterId": 5,
"backupObTenantId": 1001,
"backupTenantId": 1000012,
"backupTenantName": "yctest",
"createTime": "2021-08-31T14:17:23.808+0800",
"errorMsg": "",
"finishTime": "2021-08-31T14:18:42.265+0800",
"finished": true,
"id": 1,
"ocpJobId": -1,
"restoreClusterId": 1000005,
"restoreClusterName": "yc0820_17",
"restoreEndTime": "2021-08-31T10:00:00.000+0800",
"restoreObClusterId": 5,
"restorePoolListStr": "pool_ycrestore_zone1_gmb",
"restoreTenantName": "ycrestore",
"restoreUri": "file:///obbackup/",
"status": "RESTORE_SUCCESS",
"statusDesc": "完了",
"successful": true
}
],
"page": {
"number": 1,
"size": 2,
"totalElements": 2,
"totalPages": 1
}
},
"duration": 90,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-23T14:49:34.885+08:00",
"traceId": "63620e1f4273439a"
}