Note
This view is available starting with V4.2.1.
Purpose
This view displays information about a table-level restore task. A table-level restore task includes restore operations for auxiliary tenants and cross-tenant import operations. The view corresponds to two task records: one for the sys tenant and one for the target user tenant. Specifically:
The task record for the
systenant primarily records the progress of the table-level restore task for the target user tenant. When the entire table-level restore task for the target tenant is completed, this task record is marked as completed.The task record for the target user tenant includes the progress of the auxiliary tenant restore and the table import task. When both the auxiliary tenant restore and the table import tasks are completed, this task record is marked as completed.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the task belongs. |
| JOB_ID | bigint(20) | NO | The ID of the task. |
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the parent task's tenant. |
| INITIATOR_JOB_ID | bigint(20) | NO | The ID of the parent task. |
| START_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task started. |
| FINISH_TIMESTAMP | timestamp(6) | NO | The current time of the tenant when the task completed. |
| STATUS | varchar(64) | NO | The status of the task. Valid values:
|
| AUX_TENANT_NAME | varchar(64) | NO | The name of the auxiliary tenant. |
| TARGET_TENANT_NAME | varchar(64) | NO | The name of the target tenant. |
| IMPORT_ALL | tinyint(4) | NO | Indicates whether to import all tables under the tenant. This value is 1 only when the RECOVER TABLE *.* statement is specified. In other cases, this value is 0. |
| DB_LIST | longtext | YES | The list of databases to be fully restored. |
| TABLE_LIST | longtext | YES | The list of tables to be restored. |
| RESTORE_SCN | bigint(20) unsigned | NO | The restore point specified by the user. |
| RESTORE_SCN_DISPLAY | datetime(6) | NO | The timestamp representation of the restore point specified by the user. |
| RESTORE_OPTION | varchar(4096) | NO | The restore_option parameter of the auxiliary tenant. |
| BACKUP_DEST | varchar(4096) | NO | The backup and archive path. |
| BACKUP_SET_LIST | longtext | NO | The data backup path. |
| BACKUP_PIECE_LIST | longtext | NO | The log archive path. |
| BACKUP_PASSWD | varchar(4096) | YES | The password of the backup set. |
| EXTERNAL_KMS_INFO | varchar(4096) | YES | If the source tenant has configured key management, you must configure this parameter in the session. |
| REMAP_DB_LIST | longtext | YES | The list of renamed databases. Format: db1:new_db1, db2:newdb2 |
| REMAP_TABLE_LIST | longtext | YES | The list of renamed tables. Format: db1.t1:new_t1, db1.t2:db2.new_t2 |
| REMAP_TABLEGROUP_LIST | longtext | YES | The list of table groups to be remapped. You can remap tables from the original table group to the target table group. Format: tg1:new_tg1, tg2:new_tg2 |
| REMAP_TABLESPACE_LIST | longtext | YES | The list of tablespaces to be remapped. You can remap tables from the original tablespace to the target tablespace. Format: ts1:new_ts1, ts2:new_ts2 |
| RESULT | varchar(64) | YES | The result of the table-level restore task. Valid values:
|
| COMMENT | longtext | YES | The comment. |
| DESCRIPTION | longtext | YES | The DESCRIPTION specified in the restore command. |
Sample query
Query the information about the entire table-level restore task in the sys tenant during the table-level restore process.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_RECOVER_TABLE_JOBS\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1
JOB_ID: 1
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 0
START_TIMESTAMP: 2025-01-07 16:07:33.965561
FINISH_TIMESTAMP: NULL
STATUS: RECOVERING
AUX_TENANT_NAME: AUX_RECOVER$1736237253959061
TARGET_TENANT_NAME: mysql001
IMPORT_ALL: 0
DB_LIST:
TABLE_LIST: `infotest`.`t2`
RESTORE_SCN: 1736237207609421000
RESTORE_SCN_DISPLAY: 2025-01-07 16:06:47.609421
RESTORE_OPTION: pool_list=rptest
BACKUP_DEST: file:///home/admin/oceanbase/arglog,file:///home/admin/oceanbase/backupdata
BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_4_full
BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
BACKUP_PASSWD: NULL
EXTERNAL_KMS_INFO: NULL
REMAP_DB_LIST:
REMAP_TABLE_LIST: `infotest`.`t2`:`infotest`.`newtb2`
REMAP_TABLEGROUP_LIST:
REMAP_TABLESPACE_LIST:
RESULT:
COMMENT:
DESCRIPTION: NULL
*************************** 2. row ***************************
TENANT_ID: 1002
JOB_ID: 5
INITIATOR_TENANT_ID: 1
INITIATOR_JOB_ID: 1
START_TIMESTAMP: 2025-01-07 16:07:33.965561
FINISH_TIMESTAMP: NULL
STATUS: RESTORE_AUX_TENANT
AUX_TENANT_NAME: AUX_RECOVER$1736237253959061
TARGET_TENANT_NAME: mysql001
IMPORT_ALL: 0
DB_LIST:
TABLE_LIST: `infotest`.`t2`
RESTORE_SCN: 1736237207609421000
RESTORE_SCN_DISPLAY: 2025-01-07 16:06:47.609421
RESTORE_OPTION: pool_list=rptest
BACKUP_DEST: file:///home/admin/oceanbase/arglog,file:///home/admin/oceanbase/backupdata
BACKUP_SET_LIST: file:///home/admin/oceanbase/backupdata/backup_set_4_full
BACKUP_PIECE_LIST: file:///home/admin/oceanbase/arglog/piece_d1001r1p1
BACKUP_PASSWD: NULL
EXTERNAL_KMS_INFO: NULL
REMAP_DB_LIST:
REMAP_TABLE_LIST: `infotest`.`t2`:`infotest`.`newtb2`
REMAP_TABLEGROUP_LIST:
REMAP_TABLESPACE_LIST:
RESULT:
COMMENT:
DESCRIPTION: NULL
2 rows in set
References
For more information about how to view the progress of a table-level restore task, see View the table restore progress.