After initiating backup validation, you can view the status and progress of the validation task through views.
View backup validation tasks for user tenants from the system tenant (sys tenant)
The system tenant can use the CDB_OB_BACKUP_VALIDATE_JOBS and CDB_OB_BACKUP_VALIDATE_TASKS views to view the status and progress of all validation tasks for each user tenant.
Specifically:
In the
CDB_OB_BACKUP_VALIDATE_JOBSview, each Job corresponds to a validation command. If a validation command involves multiple user tenants, the view may show multiple sub-Jobs at the user tenant level.In the
CDB_OB_BACKUP_VALIDATE_TASKSview, each Task corresponds to a validation task for a backup set (backup_set) or log archive piece (archive_piece).
To view backup validation progress from the system tenant (sys tenant), perform the following steps:
Log in to the cluster as the
rootuser of the system tenant (systenant).The following is a sample connection command. Use the actual environment parameters when connecting to the database.
obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -AView the status and progress of job-level validation tasks.
obclient(root@sys)[(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_VALIDATE_JOBS\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1 JOB_ID: 3 INCARNATION: 1 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 0 EXECUTOR_TENANT_ID: 1002 TYPE: DATABASE PATH: PATH_TYPE: ID: VALIDATE_LEVEL: basic START_TIMESTAMP: 2026-03-03 14:25:46.576284 END_TIMESTAMP: NULL STATUS: DOING RETRY_COUNT: 0 TASK_COUNT: 0 SUCCESS_TASK_COUNT: 0 RESULT: 0 DESCRIPTION: COMMENT: *************************** 2. row *************************** TENANT_ID: 1002 JOB_ID: 6 INCARNATION: 1 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 3 EXECUTOR_TENANT_ID: TYPE: DATABASE PATH: PATH_TYPE: ID: VALIDATE_LEVEL: basic START_TIMESTAMP: 2026-03-03 14:25:46.581725 END_TIMESTAMP: NULL STATUS: DOING RETRY_COUNT: 0 TASK_COUNT: 3 SUCCESS_TASK_COUNT: 0 RESULT: 0 DESCRIPTION: COMMENT: all archive pieces are not support for backup validate or not find any piece 2 rows in setIn the query result:
The first row shows the validation Job related to the system tenant (
systenant) (TENANT_IDis 1).JOB_IDis 3. The tenant that initiated this Job is the system tenant (systenant) (INITIATOR_TENANT_IDis 1). The user tenant to validate is the user tenant withTENANT_ID1002 (EXECUTOR_TENANT_IDis 1002). The validation targets all backup sets and log archive pieces under the entire backup and archive paths (TYPEisDATABASE). This is validation without a specified path (PATH,PATH_TYPE,ID, and other fields are empty). The validation level is Basic (VALIDATE_LEVELisbasic).The second row shows the validation Job related to the user tenant with
TENANT_ID1002.JOB_IDis 6. The tenant that initiated this Job is the system tenant (systenant) (INITIATOR_TENANT_IDis 1). TheJOB_IDof the Job that initiated this Job is 3. The user tenant to validate is the current tenant (EXECUTOR_TENANT_IDis empty). The validation targets all backup sets and log archive pieces under the entire backup and archive paths (TYPEisDATABASE). This is validation without a specified path (PATH,PATH_TYPE,ID, and other fields are empty). The validation level is Basic (VALIDATE_LEVELisbasic).
View task-level backup validation tasks, that is, the validation status of backup sets or log archive pieces.
obclient(root@sys)[(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_VALIDATE_TASKS\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 12 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: BACKUPSET ID: 1 PATH: file:///data/nfs/backup/data/backup_set_1_full PATH_TYPE: BACKUP_SET_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: OFF INITIATOR_TASK_ID: 0 VALIDATE_LEVEL: basic ROUND_ID: 0 START_TIMESTAMP: 2026-03-03 14:25:46.597323 END_TIMESTAMP: 2026-03-03 14:25:47.767907 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 21126037 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: *************************** 2. row *************************** TENANT_ID: 1002 TASK_ID: 13 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: BACKUPSET ID: 2 PATH: file:///data/nfs/backup/data/backup_set_2_full PATH_TYPE: BACKUP_SET_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: ON INITIATOR_TASK_ID: 0 VALIDATE_LEVEL: basic ROUND_ID: 0 START_TIMESTAMP: 2026-03-03 14:25:46.599383 END_TIMESTAMP: 2026-03-03 14:25:49.841837 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 19295388 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: *************************** 3. row *************************** TENANT_ID: 1002 TASK_ID: 14 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: ARCHIVELOG_PIECE ID: 1 PATH: file:///data/nfs/backup/data/backup_set_2_full/complement_log/piece_d1002r1p1 PATH_TYPE: ARCHIVELOG_PIECE_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: ON INITIATOR_TASK_ID: 13 VALIDATE_LEVEL: basic ROUND_ID: 1 START_TIMESTAMP: 2026-03-03 14:25:46.601306 END_TIMESTAMP: 2026-03-03 14:25:49.849563 STATUS: COMPLETED TOTAL_LS_COUNT: 0 FINISH_LS_COUNT: 0 TOTAL_BYTES: 0 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: 3 rows in setThe query result shows three task-level validation tasks related to the user tenant with tenant ID 1002:
In the first row, the
TASK_IDof this Task is 12, and the correspondingJOB_IDis 6. It validates the backup set withbackup_set_id1 (TASK_TYPEisBACKUPSET,IDis 1). The backup set path isfile:///data/nfs/backup/data/backup_set_2_full, and the backup path ID is 1002 (DEST_IDis 1002). This backup set is not a compensation log (PLUS_ARCHIVELOGisOFF). The validation level is Basic (VALIDATE_LEVELisbasic).In the second row, the
TASK_IDof this Task is 13, and the correspondingJOB_IDis also 6. It validates the backup set withbackup_set_id2 (TASK_TYPEisBACKUPSET,IDis 2). The backup set path isfile:///data/nfs/backup/data/backup_set_2_full, and the backup path ID is 1002 (DEST_IDis 1002). This backup set is a compensation log, and this Task is the parent Task (PLUS_ARCHIVELOGisON,INITIATOR_TASK_IDis 0). The validation level is Basic (VALIDATE_LEVELisbasic).In the third row, the
TASK_IDof this Task is 14, and the correspondingJOB_IDis also 6. It validates the log archive piece withpiece_id1 (TASK_TYPEisARCHIVELOG_PIECE,IDis 1). The archive piece path isfile:///data/nfs/backup/data/backup_set_2_full/complement_log/piece_d1002r1p1, and the path ID is 1002 (DEST_IDis 1002). This archive piece is a compensation log, and the parentTASK_IDof the compensation log is 13 (PLUS_ARCHIVELOGisON,INITIATOR_TASK_IDis 13). The validation level is Basic (VALIDATE_LEVELisbasic).
User tenant views backup validation tasks for the current tenant
User tenants can use the DBA_OB_BACKUP_VALIDATE_JOBS and DBA_OB_BACKUP_VALIDATE_TASKS views to view the status and progress of validation tasks for the current tenant.
Specifically:
In the
DBA_OB_BACKUP_VALIDATE_JOBSview, each Job corresponds to a validation command.In the
DBA_OB_BACKUP_VALIDATE_TASKSview, each Task corresponds to a validation task for a backup set (backup_set) or log archive piece (archive_piece).
To view backup validation progress from a user tenant, perform the following steps:
Log in to the database as the administrator of the user tenant.
Note
For a MySQL-compatible tenant, the administrator user is the
rootuser. For an Oracle tenant, it is theSYSuser.The following is a sample connection command. Use the actual environment parameters when connecting to the database.
obclient -h10.xx.xx.xx -P2883 -uroot@mysql001#obdemo -p***** -AView the status and progress of job-level validation tasks.
MySQL-compatible modeOracle-compatible modeThe query statement in MySQL-compatible mode is as follows:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_JOBS;The query statement in Oracle-compatible mode is as follows:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_JOBS;An example of the query result is as follows:
*************************** 1. row *************************** JOB_ID: 6 INCARNATION: 1 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 3 EXECUTOR_TENANT_ID: TYPE: DATABASE PATH: PATH_TYPE: ID: VALIDATE_LEVEL: basic START_TIMESTAMP: 2026-03-03 14:25:46.581725 END_TIMESTAMP: NULL STATUS: DOING RETRY_COUNT: 0 TASK_COUNT: 3 SUCCESS_TASK_COUNT: 0 RESULT: 0 DESCRIPTION: COMMENT: all archive pieces are not support for backup validate or not find any piece 1 row in setView task-level backup validation tasks, that is, the validation status of backup sets or log archive pieces.
MySQL-compatible modeOracle-compatible modeThe query statement in MySQL-compatible mode is as follows:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_TASKS;The query statement in Oracle-compatible mode is as follows:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_TASKS;An example of the query result is as follows:
*************************** 1. row *************************** TASK_ID: 12 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: BACKUPSET ID: 1 PATH: file:///data/nfs/backup/data/backup_set_1_full PATH_TYPE: BACKUP_SET_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: OFF INITIATOR_TASK_ID: 0 VALIDATE_LEVEL: basic ROUND_ID: 0 START_TIMESTAMP: 2026-03-03 14:25:46.597323 END_TIMESTAMP: 2026-03-03 14:25:47.767907 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 21126037 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: *************************** 2. row *************************** TASK_ID: 13 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: BACKUPSET ID: 2 PATH: file:///data/nfs/backup/data/backup_set_2_full PATH_TYPE: BACKUP_SET_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: ON INITIATOR_TASK_ID: 0 VALIDATE_LEVEL: basic ROUND_ID: 0 START_TIMESTAMP: 2026-03-03 14:25:46.599383 END_TIMESTAMP: 2026-03-03 14:25:49.841837 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 19295388 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: *************************** 3. row *************************** TASK_ID: 14 INCARNATION: 1 JOB_ID: 6 TASK_TYPE: ARCHIVELOG_PIECE ID: 1 PATH: file:///data/nfs/backup/data/backup_set_2_full/complement_log/piece_d1002r1p1 PATH_TYPE: ARCHIVELOG_PIECE_DEST DEST_ID: 1002 PLUS_ARCHIVELOG: ON INITIATOR_TASK_ID: 13 VALIDATE_LEVEL: basic ROUND_ID: 1 START_TIMESTAMP: 2026-03-03 14:25:46.601306 END_TIMESTAMP: 2026-03-03 14:25:49.849563 STATUS: COMPLETED TOTAL_LS_COUNT: 0 FINISH_LS_COUNT: 0 TOTAL_BYTES: 0 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: 3 rows in set
