After a table-level restore job is completed, you can check the results of the table-level restore in the corresponding views.
Step 1: Check the overall result of the table-level restore job
Log in to the
systenant of the cluster where the target tenant for the tables to be restored resides, as therootuser.Run the following commands to check the result of the entire table-level restore job and the result of the auxiliary tenant restore.
Check the result of the entire table-level restore job.
obclient> SELECT * FROM oceanbase.CDB_OB_RECOVER_TABLE_JOB_HISTORY WHERE TENANT_ID = tenant_id\GThe fields in the
CDB_OB_RECOVER_TABLE_JOB_HISTORYview are basically the same as those in theCDB_OB_RECOVER_TABLE_JOBSview. TheCOMMENTfield is used to record the error information when the job fails. For more information about the fields in theCDB_OB_RECOVER_TABLE_JOB_HISTORYview, see Views related to table-level restore.Replace
tenant_idwith the actual tenant ID. The following is a sample query result:Example 1: All target tables are restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 2 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:42:19.274226 FINISH_TIMESTAMP: 2025-09-11 11:43:35.495161 STATUS: COMPLETED AUX_TENANT_NAME: AUX_RECOVER$1692106995896258 TARGET_TENANT_NAME: backup_tenant IMPORT_ALL: 0 DB_LIST: `DB` TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` RESTORE_SCN: 1692104831498747191 RESTORE_SCN_DISPLAY: 2025-09-11 11:40:15.000000 RESTORE_OPTION: pool_list=small_pool_0&primary_zone=z1 BACKUP_DEST: file:///data2/nfs/ob_backup_oracle_tenant/archive,file:///data2/nfs/ob_backup_oracle_tenant/data BACKUP_SET_LIST: file:///data2/nfs/ob_backup_oracle_tenant/data/backup_set_1_full BACKUP_PIECE_LIST: file:///data2/nfs/ob_backup_oracle_tenant/archive/piece_d1001r1p1 BACKUP_PASSWD: NULL EXTERNAL_KMS_INFO: NULL REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: RESULT: SUCCESS COMMENT: import succeed table count: 3, failed table count: 0 DESCRIPTION: NULL 1 row in setExample 2: Some target tables are restored, while others are not
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 2 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:42:19.274226 FINISH_TIMESTAMP: 2025-09-11 11:43:35.495161 STATUS: COMPLETED AUX_TENANT_NAME: AUX_RECOVER$1692106995896258 TARGET_TENANT_NAME: backup_tenant IMPORT_ALL: 0 DB_LIST: `DB` TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` RESTORE_SCN: 1692104831498747191 RESTORE_SCN_DISPLAY: 2025-09-11 11:40:15.000000 RESTORE_OPTION: pool_list=small_pool_0&primary_zone=z1 BACKUP_DEST: file:///data2/nfs/ob_backup_oracle_tenant/archive,file:///data2/nfs/ob_backup_oracle_tenant/data BACKUP_SET_LIST: file:///data2/nfs/ob_backup_oracle_tenant/data/backup_set_1_full BACKUP_PIECE_LIST: file:///data2/nfs/ob_backup_oracle_tenant/archive/piece_d1001r1p1 BACKUP_PASSWD: NULL EXTERNAL_KMS_INFO: NULL REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: RESULT: PARTIAL_SUCCESS COMMENT: import succeed table count: 2, failed table count: 1 DESCRIPTION: NULL 1 row in setExample 3: The user cancels the table-level restore job halfway, and some target tables are restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 2 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:42:19.274226 FINISH_TIMESTAMP: 2025-09-11 11:43:35.495161 STATUS: COMPLETED AUX_TENANT_NAME: AUX_RECOVER$1692106995896258 TARGET_TENANT_NAME: backup_tenant IMPORT_ALL: 0 DB_LIST: `DB` TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` RESTORE_SCN: 1692104831498747191 RESTORE_SCN_DISPLAY: 2025-09-11 11:40:15.000000 RESTORE_OPTION: pool_list=small_pool_0&primary_zone=z1 BACKUP_DEST: file:///data2/nfs/ob_backup_oracle_tenant/archive,file:///data2/nfs/ob_backup_oracle_tenant/data BACKUP_SET_LIST: file:///data2/nfs/ob_backup_oracle_tenant/data/backup_set_1_full BACKUP_PIECE_LIST: file:///data2/nfs/ob_backup_oracle_tenant/archive/piece_d1001r1p1 BACKUP_PASSWD: NULL EXTERNAL_KMS_INFO: NULL REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: RESULT: PARTIAL_SUCCESS COMMENT: comment: OB_CANCEL(-4072), addr:11.xxx.xxx.xxx:18000, trace_id:Y4********-**********-0-0 DESCRIPTION: NULL 1 row in setExample 4: All target tables are not restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 2 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:42:19.274226 FINISH_TIMESTAMP: 2025-09-11 11:43:35.495161 STATUS: COMPLETED AUX_TENANT_NAME: AUX_RECOVER$1692106995896258 TARGET_TENANT_NAME: backup_tenant IMPORT_ALL: 0 DB_LIST: `DB` TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` RESTORE_SCN: 1692104831498747191 RESTORE_SCN_DISPLAY: 2025-09-11 11:40:15.000000 RESTORE_OPTION: pool_list=small_pool_0&primary_zone=z1 BACKUP_DEST: file:///data2/nfs/ob_backup_oracle_tenant/archive,file:///data2/nfs/ob_backup_oracle_tenant/data BACKUP_SET_LIST: file:///data2/nfs/ob_backup_oracle_tenant/data/backup_set_1_full BACKUP_PIECE_LIST: file:///data2/nfs/ob_backup_oracle_tenant/archive/piece_d1001r1p1 BACKUP_PASSWD: NULL EXTERNAL_KMS_INFO: NULL REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: RESULT: FAILED COMMENT: import succeed table count: 0, failed table count: 3 DESCRIPTION: NULL 1 row in set
Check the result of the restore job for the auxiliary tenant.
obclient> SELECT * FROM oceanbase.CDB_OB_RESTORE_HISTORY\GThe restore process for the auxiliary tenant is the same as that for tenant-level physical restore. For more information about how to check the physical restore result, see Check the result of physical restore.
Step 2: Check the overall result of the cross-tenant table import job
Based on the overall execution of the table-level restore job, you can further check the overall result of the cross-tenant table import job.
Log in to the
systenant of the cluster where the target tenant for the tables to be restored resides, as therootuser.Run the following command to check the result of the cross-tenant import job for the target tenant.
obclient> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_JOB_HISTORY WHERE TENANT_ID = tenant_id AND INITIATOR_JOB_ID = recover_table_job_id\GReplace
tenant_idwith the actual tenant ID, and replacerecover_table_job_idwith theJOB_IDof the table-level restore job queried in Step 1: Check the overall result of the table-level restore job.The fields in the
CDB_OB_IMPORT_TABLE_JOB_HISTORYview are basically the same as those in theCDB_OB_IMPORT_TABLE_JOBSview. TheCOMMENTfield is used to record the error information when the job fails. For more information about the fields in theCDB_OB_IMPORT_TABLE_JOB_HISTORYview, see Views related to table-level restore.The following is a sample query result:
Example 1: All target tables are restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 3 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:43:15.204649 FINISH_TIMESTAMP: 2025-09-11 11:43:25.453894 SRC_TENANT_NAME: AUX_RECOVER$1692179849034890 SRC_TENANT_ID: 1004 STATUS: IMPORT_FINISH IMPORT_ALL: 0 DB_LIST: TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: TOTAL_TABLE_COUNT: 3 FINISHED_TABLE_COUNT: 3 FAILED_TABLE_COUNT: 0 RESULT: SUCCESS COMMENT: import succeed table count: 3, failed table count: 0 1 row in setExample 2: Some target tables are restored, while others are not
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 3 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:43:15.204649 FINISH_TIMESTAMP: 2025-09-11 11:43:25.453894 SRC_TENANT_NAME: AUX_RECOVER$1692179849034890 SRC_TENANT_ID: 1004 STATUS: IMPORT_FINISH IMPORT_ALL: 0 DB_LIST: TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: TOTAL_TABLE_COUNT: 3 FINISHED_TABLE_COUNT: 2 FAILED_TABLE_COUNT: 1 RESULT: PARTIAL_SUCCESS COMMENT: import succeed table count: 2, failed table count: 1 1 row in setExample 3: The user cancels the table-level restore job halfway, and some target tables are restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 3 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:43:15.204649 FINISH_TIMESTAMP: 2025-09-11 11:43:25.453894 SRC_TENANT_NAME: AUX_RECOVER$1692179849034890 SRC_TENANT_ID: 1004 STATUS: IMPORT_FINISH IMPORT_ALL: 0 DB_LIST: TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: TOTAL_TABLE_COUNT: 3 FINISHED_TABLE_COUNT: 2 FAILED_TABLE_COUNT: 1 RESULT: PARTIAL_SUCCESS COMMENT: comment: OB_CANCEL(-4072), addr:11.xxx.xxx.xxx:18000, trace_id:Y4********-**********-0-0 1 row in setExample 4: All target tables are not restored
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 3 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2025-09-11 11:43:15.204649 FINISH_TIMESTAMP: 2025-09-11 11:43:25.453894 SRC_TENANT_NAME: AUX_RECOVER$1692179849034890 SRC_TENANT_ID: 1004 STATUS: IMPORT_FINISH IMPORT_ALL: 0 DB_LIST: TABLE_LIST: `TEST`.`T1`,`TEST`.`T2`,`TEST`.`T3` REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T1`,`TEST`.`T2`:`RECOVER_TEST`.`T2`,`TEST`.`T3`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: TOTAL_TABLE_COUNT: 3 FINISHED_TABLE_COUNT: 0 FAILED_TABLE_COUNT: 3 RESULT: FAILED COMMENT: import succeed table count: 0, failed table count: 3 1 row in set
Step 3: Check the result of each table
Based on the execution of the cross-tenant table import job, if a table is not imported successfully, you can further check the result of each table.
Log in to the
systenant of the cluster where the target tenant for the tables to be restored resides, as therootuser.Run the following command to check the result of importing each table.
obclient> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_TASK_HISTORY WHERE TENANT_ID = tenant_id AND JOB_ID = import_table_job_id\GReplace
tenant_idwith the actual tenant ID, and replaceimport_table_job_idwith theJOB_IDof the cross-tenant table import job queried in Step 2: Check the overall result of the cross-tenant table import job.The fields in the
CDB_OB_IMPORT_TABLE_TASK_HISTORYview are basically the same as those in theCDB_OB_IMPORT_TABLE_TASKSview. TheCOMMENTfield is used to record the error information when the job fails. For more information about the fields in theCDB_OB_IMPORT_TABLE_TASK_HISTORYview, see Views related to table-level restore.The following is a sample query result:
Example 1: The target table is restored, and all schemas associated with the target table are restored
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1047 JOB_ID: 3 SRC_TENANT_ID: 1004 SRC_TABLESPACE: NULL SRC_TABLEGROUP: NULL SRC_DATABASE: TEST SRC_TABLE: T1 SRC_PARTITION: NULL TARGET_TABLESPACE: NULL TARGET_TABLEGROUP: NULL TARGET_DATABASE: RECOVER_TEST TARGET_TABLE: T1 TABLE_COLUMN: 7 STATUS: FINISH START_TIMESTAMP: 2025-09-11 11:43:15.270078 COMPLETION_TIMESTAMP: 2025-09-11 11:43:25.422834 CUMULATIVE_TS: -1 TOTAL_INDEX_COUNT: 2 IMPORTED_INDEX_COUNT: 2 FAILED_INDEX_COUNT: 0 TOTAL_CONSTRAINT_COUNT: 1 IMPORTED_CONSTRAINT_COUNT: 1 FAILED_CONSTRAINT_COUNT: 0 TOTAL_REF_CONSTRAINT_COUNT: 0 IMPORTED_REF_CONSTRAINT_COUNT: 0 FAILED_REF_CONSTRAINT_COUNT: 0 RESULT: SUCCEESS COMMENT: 1 row in setExample 2: The target table is restored, but the user deletes the restored target table during the restore
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1047 JOB_ID: 3 SRC_TENANT_ID: 1004 SRC_TABLESPACE: NULL SRC_TABLEGROUP: NULL SRC_DATABASE: TEST SRC_TABLE: T1 SRC_PARTITION: NULL TARGET_TABLESPACE: NULL TARGET_TABLEGROUP: NULL TARGET_DATABASE: RECOVER_TEST TARGET_TABLE: T1 TABLE_COLUMN: 7 STATUS: FINISH START_TIMESTAMP: 2025-09-11 11:43:15.270078 COMPLETION_TIMESTAMP: 2025-09-11 11:43:25.422834 CUMULATIVE_TS: -1 TOTAL_INDEX_COUNT: 2 IMPORTED_INDEX_COUNT: 2 FAILED_INDEX_COUNT: 0 TOTAL_CONSTRAINT_COUNT: 1 IMPORTED_CONSTRAINT_COUNT: 1 FAILED_CONSTRAINT_COUNT: 0 TOTAL_REF_CONSTRAINT_COUNT: 0 IMPORTED_REF_CONSTRAINT_COUNT: 0 FAILED_REF_CONSTRAINT_COUNT: 0 RESULT: SUCCEESS COMMENT: table type_tbl has been deleted by user 1 row in setExample 3: The target table is restored, but the schemas associated with the target table are partially restored
Generally, failures to restore schemas associated with a table, such as index tables, constraints, and foreign keys, do not affect the restore of the main table. For example, in the following returned result, a
FAILED_INDEX_COUNTvalue of1indicates that one index associated with the target table failed to be restored, but the restore job of the main table was still successful.***************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1047 JOB_ID: 3 SRC_TENANT_ID: 1004 SRC_TABLESPACE: NULL SRC_TABLEGROUP: NULL SRC_DATABASE: TEST SRC_TABLE: T1 SRC_PARTITION: NULL TARGET_TABLESPACE: NULL TARGET_TABLEGROUP: NULL TARGET_DATABASE: TEST TARGET_TABLE: T1 TABLE_COLUMN: 2 STATUS: FINISH START_TIMESTAMP: 2025-09-11 11:43:15.270078 COMPLETION_TIMESTAMP: 2025-09-11 11:43:25.422834 CUMULATIVE_TS: -1 TOTAL_INDEX_COUNT: 2 IMPORTED_INDEX_COUNT: 1 FAILED_INDEX_COUNT: 1 TOTAL_CONSTRAINT_COUNT: 2 IMPORTED_CONSTRAINT_COUNT: 2 FAILED_CONSTRAINT_COUNT: 0 TOTAL_REF_CONSTRAINT_COUNT: 0 IMPORTED_REF_CONSTRAINT_COUNT: 0 FAILED_REF_CONSTRAINT_COUNT: 0 RESULT: SUCCEESS COMMENT: 1 row in setIn particular, in Oracle-compatible mode, the constraint names of tables must be unique within a user. If the restore of a primary key constraint named for a table fails due to a constraint name conflict, the restore of the main table is affected, and the entire table restore job fails. For example, in the following returned result, the restore of the primary key constraint failed, causing the restore job of the main table to fail.
***************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1047 JOB_ID: 3 SRC_TENANT_ID: 1004 SRC_TABLESPACE: NULL SRC_TABLEGROUP: NULL SRC_DATABASE: TEST SRC_TABLE: T1 SRC_PARTITION: NULL TARGET_TABLESPACE: NULL TARGET_TABLEGROUP: NULL TARGET_DATABASE: TEST TARGET_TABLE: T1 TABLE_COLUMN: 2 STATUS: FINISH START_TIMESTAMP: 2025-09-11 11:43:15.270078 COMPLETION_TIMESTAMP: 2025-09-11 11:43:25.422834 CUMULATIVE_TS: -1 TOTAL_INDEX_COUNT: 0 IMPORTED_INDEX_COUNT: 0 FAILED_INDEX_COUNT: 0 TOTAL_CONSTRAINT_COUNT: 2 IMPORTED_CONSTRAINT_COUNT: 0 FAILED_CONSTRAINT_COUNT: 2 TOTAL_REF_CONSTRAINT_COUNT: 0 IMPORTED_REF_CONSTRAINT_COUNT: 0 FAILED_REF_CONSTRAINT_COUNT: 0 RESULT: FAILED COMMENT: OBE-02264: name already used by an existing constraint 1 row in set
