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 the restore operations of an auxiliary tenant and the cross-tenant import operations. 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 displays the progress of the table-level restore task for the target user tenant. The task is considered completed when the table-level restore task for the target user tenant is completed.The record for the target user tenant displays the progress of the restore operations of the auxiliary tenant and the progress of the table import task. The task is considered completed when the restore operations of the auxiliary tenant and the table import task are completed.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| JOB_ID | bigint(20) | NO | The ID of the task. |
| INITIATOR_TENANT_ID | bigint(20) | NO | The ID of the parent 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 in the tenant. This value is 1 only when the RECOVER TABLE *.* clause is specified. Otherwise, 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 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 enabled key management, 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 information specified in the restore command. |
Sample query
Query the information about the 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 restore progress.
