After a backup validation task is completed, you can view the execution result of the task in the view.
View the backup validation result of a user tenant in the system tenant
As a system tenant, you can view the execution result of all backup validation tasks in each user tenant in the views CDB_OB_BACKUP_VALIDATE_JOB_HISTORY and CDB_OB_BACKUP_VALIDATE_TASK_HISTORY.
The views are described as follows:
In the view
CDB_OB_BACKUP_VALIDATE_JOB_HISTORY, each job corresponds to a backup validation instruction. If the instruction involves multiple user tenants, the view may contain multiple sub-jobs at the user tenant level.In the view
CDB_OB_BACKUP_VALIDATE_TASK_HISTORY, each task corresponds to a backup validation task for a backup set (backup_set) or a log archive piece (archive_piece).
To view the backup validation result in the system tenant, perform the following steps:
Log in to the
systenant of the cluster as therootuser.The following example shows how to connect to the database. Replace the actual environment variables.
obclient -h10.xx.xx.xx -P2883 -uroot@sys#obdemo -p***** -AView the execution result of the job-level backup validation task.
obclient(root@sys)[(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_VALIDATE_JOB_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 JOB_ID: 2 INCARNATION: 1 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 0 EXECUTOR_TENANT_ID: TYPE: DATABASE PATH: PATH_TYPE: ID: VALIDATE_LEVEL: basic START_TIMESTAMP: 2026-03-03 13:58:07.778690 END_TIMESTAMP: 2026-03-03 13:58:09.864257 STATUS: COMPLETED RETRY_COUNT: 0 TASK_COUNT: 1 SUCCESS_TASK_COUNT: 1 RESULT: 0 DESCRIPTION: COMMENT: all archive pieces are not support for backup validate or not find any piece 1 row in setThe query result shows the execution result of the job-level backup validation task in the user tenant with the tenant ID 1002. In this case,
job_idis 2, the initiator tenant ID is 1002, the executor tenant ID is empty, the backup validation task validates all backup sets and log archive pieces in the entire backup path and archive path (TYPEisDATABASE), the validation path is not specified (PATH,PATH_TYPE, andIDare empty), the validation level is basic (VALIDATE_LEVELisbasic), and the task is completed (STATUSisCOMPLETED). The validation result isall archive pieces are not support for backup validate or not find any piece.View the execution result of the task-level backup validation task, that is, the backup validation result of a backup set or a log archive piece.
obclient(root@sys)[(none)]> SELECT * FROM oceanbase.CDB_OB_BACKUP_VALIDATE_TASK_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 3 INCARNATION: 1 JOB_ID: 2 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 13:58:07.802366 END_TIMESTAMP: 2026-03-03 13:58:09.860637 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 21126037 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: 1 row in setThe query result shows the execution result of the task-level backup validation task in the user tenant with the tenant ID 1002. In this case,
task_idis 3, the correspondingjob_idis 2, the backup set ID is 1 (TASK_TYPEisBACKUPSETandIDis 1), the backup set is stored in the pathfile:///data/nfs/backup/data/backup_set_1_full, the backup path ID is 1002 (DEST_IDis 1002), the backup set does not contain compensation logs (PLUS_ARCHIVELOGisOFF), the validation level is basic (VALIDATE_LEVELisbasic), and the task is completed (STATUSisCOMPLETED).
View the backup validation result of a user tenant in the user tenant
As a user tenant, you can view the execution result of all backup validation tasks in each user tenant in the views DBA_OB_BACKUP_VALIDATE_JOB_HISTORY and DBA_OB_BACKUP_VALIDATE_TASK_HISTORY.
The views are described as follows:
In the view
DBA_OB_BACKUP_VALIDATE_JOB_HISTORY, each job corresponds to a backup validation instruction.In the view
DBA_OB_BACKUP_VALIDATE_TASK_HISTORY, each task corresponds to a backup validation task for a backup set (backup_set) or a log archive piece (archive_piece).
To view the backup validation result in the user tenant, perform the following steps:
Log in to the database as the tenant administrator.
Note
The administrator of a MySQL tenant is the
rootuser. The administrator of an Oracle tenant is theSYSuser.The following example shows how to connect to the database. Replace the actual environment variables.
obclient -h10.xx.xx.xx -P2883 -uroot@mysql001#obdemo -p***** -AView the execution result of the job-level backup validation task.
MySQL modeOracle modeThe following example shows how to query the execution result of the job-level backup validation task in MySQL mode:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_JOB_HISTORY;The following example shows how to query the execution result of the job-level backup validation task in Oracle mode:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_JOB_HISTORY;The query result is as follows:
*************************** 1. row *************************** JOB_ID: 2 INCARNATION: 1 INITIATOR_TENANT_ID: 1002 INITIATOR_JOB_ID: 0 EXECUTOR_TENANT_ID: TYPE: DATABASE PATH: PATH_TYPE: ID: VALIDATE_LEVEL: basic START_TIMESTAMP: 2026-03-03 13:58:07.778690 END_TIMESTAMP: 2026-03-03 13:58:09.864257 STATUS: COMPLETED RETRY_COUNT: 0 TASK_COUNT: 1 SUCCESS_TASK_COUNT: 1 RESULT: 0 DESCRIPTION: COMMENT: all archive pieces are not support for backup validate or not find any piece 1 row in setView the execution result of the task-level backup validation task, that is, the backup validation result of a backup set or a log archive piece.
MySQL modeOracle modeThe following example shows how to query the execution result of the task-level backup validation task in MySQL mode:
obclient(root@mysqltenant)[(none)]> SELECT * FROM oceanbase.DBA_OB_BACKUP_VALIDATE_TASK_HISTORY;The following example shows how to query the execution result of the task-level backup validation task in Oracle mode:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_TASK_HISTORY;The query result is as follows:
*************************** 1. row *************************** TASK_ID: 3 INCARNATION: 1 JOB_ID: 2 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 13:58:07.802366 END_TIMESTAMP: 2026-03-03 13:58:09.860637 STATUS: COMPLETED TOTAL_LS_COUNT: 2 FINISH_LS_COUNT: 2 TOTAL_BYTES: 21126037 VALIDATED_BYTES: 0 RESULT: 0 COMMENT: 1 row in set
