After you initiate a backup verification task, you can view the status and progress of the task by using a view.
Query backup validation tasks under user tenants
The sys tenant can query the status and progress of all validation tasks under each user tenant from views CDB_OB_BACKUP_VALIDATE_JOBS and CDB_OB_BACKUP_VALIDATE_TASKS.
Here are the details of these views:
In the
CDB_OB_BACKUP_VALIDATE_JOBSview, each job corresponds to a single validation instruction. If an instruction involves multiple user tenants, the view may contain 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 an archive piece (archive_piece).
To query the backup validation progress, perform the following steps:
Log in to the
systenant of the cluster as therootuser.The following example is for reference only. Please replace the parameters with actual values based on your environment.
obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -AQuery the status and progress of job-level backup 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 setHere is the explanation of the query result:
The first row shows the job-level backup validation task for the
systenant (TENANT_ID1). Thejob_idis 3, initiated by thesystenant (INITIATOR_TENANT_ID1), and executed under the user tenant withTENANT_ID1002 (EXECUTOR_TENANT_ID1002). The task validates all backup sets and archive pieces under the complete backup path and archive path (TYPEDATABASE). The task is not for a specific path (PATH,PATH_TYPE, andIDare empty), and the validation level is basic (VALIDATE_LEVELbasic).The second row shows the job-level backup validation task for the user tenant with
TENANT_ID1002. Thejob_idis 6, initiated by thesystenant (INITIATOR_TENANT_ID1) under the jobjob_id3, and executed under the user tenant itself (EXECUTOR_TENANT_IDempty). The task validates all backup sets and archive pieces under the complete backup path and archive path (TYPEDATABASE). The task is not for a specific path (PATH,PATH_TYPE, andIDare empty), and the validation level is basic (VALIDATE_LEVELbasic).
Query the backup validation task of backup sets and archive pieces at the task level.
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 setHere are the explanations of the query result:
The first row shows a task-level backup validation task for the user tenant with
TENANT_ID1002. Thetask_idis 12 and the correspondingjob_idis 6. The task validates the backup set withbackup_set_id1 (TASK_TYPEBACKUPSET,ID1). The path of the backup set isfile:///data/nfs/backup/data/backup_set_2_full, the path ID is 1002 (DEST_ID1002). The backup set is not a compensation log (PLUS_ARCHIVELOGOFF) and the validation level is basic (VALIDATE_LEVELbasic).The second row shows another task-level backup validation task for the user tenant with
TENANT_ID1002. Thetask_idis 13 and the correspondingjob_idis also 6. The task validates the backup set withbackup_set_id2 (TASK_TYPEBACKUPSET,ID2). The path of the backup set isfile:///data/nfs/backup/data/backup_set_2_full, the path ID is 1002 (DEST_ID1002). The backup set is a compensation log, and this task is the parent task (PLUS_ARCHIVELOGON,INITIATOR_TASK_ID0). The validation level is basic (VALIDATE_LEVELbasic).The third row shows another task-level backup validation task for the user tenant with
TENANT_ID1002. Thetask_idis 14 and the correspondingjob_idis also 6. The task validates the archive piece withpiece_id1 (TASK_TYPEARCHIVELOG_PIECE,ID1). The path of the archive piece isfile:///data/nfs/backup/data/backup_set_2_full/complement_log/piece_d1002r1p1, the path ID is 1002 (DEST_ID1002). The archive piece is a compensation log, and thetask_idof the compensation log is 13 (PLUS_ARCHIVELOGON,INITIATOR_TASK_ID13). The validation level is basic (VALIDATE_LEVELbasic).
View backup validation tasks in the current user tenant
You can query the views DBA_OB_BACKUP_VALIDATE_JOBS and DBA_OB_BACKUP_VALIDATE_TASKS to view the status and progress of backup validation tasks in the current user tenant.
Where:
In the view
DBA_OB_BACKUP_VALIDATE_JOBS, each job corresponds to a backup validation instruction.In the view
DBA_OB_BACKUP_VALIDATE_TASKS, each task corresponds to a backup set (backup_set) or an archive piece (archive_piece) validation task.
To view the progress of backup validation tasks in the current user tenant, perform the following steps:
Log in as the tenant administrator of the user tenant.
Note
The administrator of a MySQL tenant is the
rootuser, and the administrator of an Oracle tenant is theSYSuser.The following example shows how to connect to the database. Please replace the parameters with the actual values in your environment.
obclient -h10.xx.xx.xx -P2883 -uroot@mysql001#obdemo -p***** -AQuery the status and progress of job-level backup validation tasks.
MySQL modeOracle modeThe following example shows the query statement in MySQL mode:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_JOBS;The following example shows the query statement in Oracle mode:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_JOBS;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 setQuery the backup validation progress of backup sets or archive pieces.
MySQL modeOracle modeThe following example shows the query statement in MySQL mode:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_TASKS;The following example shows the query statement in Oracle mode:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_TASKS;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
