Note
This view is available starting with V4.2.1.
Purpose
This view displays information about a table-level restore task. The entire process of a table-level restore task includes the restore operation of an auxiliary tenant and the cross-tenant import operation. This view corresponds to two task records: one record for the sys tenant and one record for the target user tenant. Specifically:
The record for the
systenant mainly 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 is considered completed.The record for the target user tenant includes the progress of the auxiliary tenant's restore operation and the progress of the table import task. When both the auxiliary tenant's restore operation and the table import task are completed, this task is considered completed.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant for which the task is executed. |
| JOB_ID | bigint(20) | NO | The ID of the task. |
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the tenant for the parent task. |
| 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 was 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 entire 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 of the restore point specified by the user. |
| RESTORE_OPTION | varchar(4096) | NO | The restore_option parameter required by the auxiliary tenant. |
| BACKUP_DEST | varchar(4096) | NO | The path for backup and archiving. |
| BACKUP_SET_LIST | longtext | NO | The data backup path. |
| BACKUP_PIECE_LIST | longtext | NO | The log archiving path. |
| BACKUP_PASSWD | varchar(4096) | YES | The password of the backup set. |
| EXTERNAL_KMS_INFO | varchar(4096) | YES | If the source tenant has key management configured, you must configure this parameter in the session. |
| REMAP_DB_LIST | longtext | YES | The list of renamed databases. The format is as follows: db1:new_db1, db2:newdb2. |
| REMAP_TABLE_LIST | longtext | YES | The list of renamed tables. The format is as follows: 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. The format is as follows: 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. The format is as follows: 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.
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-level restore progress.