Note
This view is available starting with V4.0.0.
Purpose
This view displays the restore tasks completed in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| JOB_ID | bigint(20) | NO | The job ID of the restore task. |
| RESTORE_TENANT_NAME | varchar(128) | NO | The name of the tenant to be restored. |
| RESTORE_TENANT_ID | bigint(20) | NO | The ID of the tenant to be restored. |
| BACKUP_TENANT_NAME | varchar(128) | NO | The name of the source tenant for the backup. |
| BACKUP_TENANT_ID | bigint(20) | NO | The ID of the source tenant for the backup. |
| BACKUP_CLUSTER_NAME | varchar(128) | NO | The name of the source cluster for the backup. |
| BACKUP_DEST | longtext | NO | The path of the backup set, which is the data backup path and log archive path specified by the user. |
| RESTORE_SCN | bigint(20) unsigned | NO | The restore point specified by the user. |
| RESTORE_SCN_DISPLAY | datetime(6) | NO | The timestamp of the restore point specified by the user. |
| RESTORE_OPTION | varchar(4096) | NO | The restore option specified by the user when initiating the restore task. |
| START_TIMESTAMP | timestamp(6) | YES | The start timestamp of the restore task. |
| FINISH_TIMESTAMP | timestamp(6) | YES | The end timestamp of the restore task. |
| STATUS | varchar(64) | NO | The restore result. Valid values: SUCCESS and FAILED.
|
| BACKUP_PIECE_LIST | longtext | NO | The list of log archive shard paths required for the restore task. The shards are separated with commas (,). Example: file:///data/nfs/backup/archive/2_1_2,file:///data/nfs/backup/archive/2_1_3. |
| BACKUP_SET_LIST | longtext | NO | The list of data backup set paths required for the restore task. The backup sets are separated with commas (,). Example: file:///data/nfs/backup/data/backup_set_1_full,file:///data/nfs/backup/data/backup_set_2_inc. |
| BACKUP_CLUSTER_VERSION | bigint(20) | NO | The version number of the source cluster for the backup. |
| LS_COUNT | bigint(20) | NO | The total number of log streams for the restore task. |
| FINISH_LS_COUNT | bigint(20) | NO | The number of log streams that have been restored. |
| TABLET_COUNT | bigint(20) | NO | The total number of tablets for the restore task. |
| FINISH_TABLET_COUNT | bigint(20) | NO | The number of tablets that have been restored. |
| TOTAL_BYTES | bigint(20) | NO | The total number of bytes for the restore task. |
| TOTAL_BYTES_DISPLAY | varchar(27) | NO | The total number of bytes for the restore task, displayed in the storage capacity unit. |
| FINISH_BYTES | bigint(20) | NO | The number of bytes that have been restored. In the current version, this value is always 0. |
| FINISH_BYTES_DISPLAY | varchar(27) | NO | The number of bytes that have been restored, displayed in the storage capacity unit. In the current version, this value is always 0. |
| DESCRIPTION | varchar(1024) | YES | The DESCRIPTION information specified in the restore command. |
| COMMENT | varchar(1024) | YES | The failure information recorded when the restore task failed. |
Sample query
Query the restore tasks completed in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_RESTORE_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
JOB_ID: 3
RESTORE_TENANT_NAME: AUX_RECOVER$1736315512813183
RESTORE_TENANT_ID: 1012
BACKUP_TENANT_NAME: mysql001
BACKUP_TENANT_ID: 1002
BACKUP_CLUSTER_NAME: test425
BACKUP_DEST: file:///home/admin/oceanbase/arglog,file:///home/admin/oceanbase/backupdata
RESTORE_SCN: 1736315345952321000
RESTORE_SCN_DISPLAY: 2025-01-08 13:49:05.952321
RESTORE_OPTION: pool_list=rptest
START_TIMESTAMP: 2025-01-08 13:51:52.836523
FINISH_TIMESTAMP: 2025-01-08 13:55:55.937792
STATUS: SUCCESS
BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1,file:///home/admin/oceanbase/arglog/piece_d1001r1p2
BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_5_full
BACKUP_CLUSTER_VERSION: 17180001538
LS_COUNT: 2
FINISH_LS_COUNT: 0
TABLET_COUNT: 1258
FINISH_TABLET_COUNT: 1258
TOTAL_BYTES: 56561873
TOTAL_BYTES_DISPLAY: 53.94MB
FINISH_BYTES: 0
FINISH_BYTES_DISPLAY: 0.00MB
DESCRIPTION: NULL
COMMENT:
1 row in set