Note
This view is available starting with V4.0.0.
Purpose
This view displays the tenant-level 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. |
| BACKUP_TENANT_ID | bigint(20) | NO | The ID of the source tenant. |
| BACKUP_CLUSTER_NAME | varchar(128) | NO | The name of the source cluster. |
| BACKUP_DEST | longtext | NO | The backup set path. This parameter specifies the data backup path and log archive path provided 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 timestamp when the restore task started. |
| FINISH_TIMESTAMP | timestamp(6) | YES | The timestamp when the restore task ended. |
| STATUS | varchar(64) | NO | The restore result:
|
| BACKUP_PIECE_LIST | longtext | NO | The list of log archive shard paths required for the restore task. The shard paths are separated by 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 set paths are separated by 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. |
| LS_COUNT | bigint(20) | NO | The total number of log streams to be restored. |
| 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 to be restored. |
| FINISH_TABLET_COUNT | bigint(20) | NO | The number of tablets that have been restored. |
| TOTAL_BYTES | bigint(20) | NO | The total number of bytes to be restored. |
| TOTAL_BYTES_DISPLAY | varchar(27) | NO | The total number of bytes to be restored, displayed in storage capacity units. |
| 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 storage capacity units. 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 completed tenant-level restore tasks in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_RESTORE_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
JOB_ID: 1
RESTORE_TENANT_NAME: mysql_test
RESTORE_TENANT_ID: 1006
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: 1736236006946129000
RESTORE_SCN_DISPLAY: 2025-01-07 15:46:46.946129
RESTORE_OPTION: pool_list=rptest
START_TIMESTAMP: 2025-01-07 15:48:35.993556
FINISH_TIMESTAMP: 2025-01-07 15:51:11.301331
STATUS: FAIL
BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_3_full
BACKUP_CLUSTER_VERSION: 17180001538
LS_COUNT: 0
FINISH_LS_COUNT: 0
TABLET_COUNT: 0
FINISH_TABLET_COUNT: 0
TOTAL_BYTES: 0
TOTAL_BYTES_DISPLAY: 0.00MB
FINISH_BYTES: 0
FINISH_BYTES_DISPLAY: 0.00MB
DESCRIPTION: NULL
COMMENT: ROOTSERVICE : OB_TENANT_NOT_EXIST(-5157) on "172.xx.xxx.xxx:2882" with traceid YB42xxxxxxxx-xxxxxxxxxxxxxxxxx-x-x
*************************** 2. row ***************************
JOB_ID: 2
RESTORE_TENANT_NAME: AUX_RECOVER$1736237253959061
RESTORE_TENANT_ID: 1008
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: 1736237207609421000
RESTORE_SCN_DISPLAY: 2025-01-07 16:06:47.609421
RESTORE_OPTION: pool_list=rptest
START_TIMESTAMP: 2025-01-07 16:07:33.973129
FINISH_TIMESTAMP: 2025-01-07 16:11:24.689245
STATUS: SUCCESS
BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_4_full
BACKUP_CLUSTER_VERSION: 17180001538
LS_COUNT: 2
FINISH_LS_COUNT: 0
TABLET_COUNT: 676
FINISH_TABLET_COUNT: 676
TOTAL_BYTES: 21145561
TOTAL_BYTES_DISPLAY: 20.17MB
FINISH_BYTES: 0
FINISH_BYTES_DISPLAY: 0.00MB
DESCRIPTION: NULL
COMMENT:
2 rows in set