After a backup validation task completes, you can view the execution results through views.
View backup validation results for user tenants from the system tenant (sys tenant)
The system tenant can use the CDB_OB_BACKUP_VALIDATE_JOB_HISTORY and CDB_OB_BACKUP_VALIDATE_TASK_HISTORY views to view the execution results of all validation tasks for each user tenant.
Specifically:
In the
CDB_OB_BACKUP_VALIDATE_JOB_HISTORYview, 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_TASK_HISTORYview, each Task corresponds to a validation task for a backup set (backup_set) or log archive piece (archive_piece).
To view backup validation results 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 execution results of job-level validation tasks.
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 results of the Job-level validation task for the user tenant with
TENANT_ID1002.JOB_IDis 2. The tenant that initiated this Job is the current tenant (INITIATOR_TENANT_IDis 1002). 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). The validation task is completed (STATUSisCOMPLETED). The validation result isall archive pieces are not support for backup validate or not find any piece.View task-level backup validation tasks, that is, the validation results of backup sets or log archive pieces.
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 results of the Task-level validation task for the user tenant with
TENANT_ID1002.TASK_IDis 3, and the correspondingJOB_IDis 2. It validates the backup set withbackup_set_id1 (TASK_TYPEisBACKUPSET,IDis 1). The backup set path isfile:///data/nfs/backup/data/backup_set_1_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). The validation task is completed (STATUSisCOMPLETED).
User tenant views backup validation results for the current tenant
User tenants can use the DBA_OB_BACKUP_VALIDATE_JOB_HISTORY and DBA_OB_BACKUP_VALIDATE_TASK_HISTORY views to view the execution results of validation tasks for the current tenant.
Specifically:
In the
DBA_OB_BACKUP_VALIDATE_JOB_HISTORYview, each Job corresponds to a validation command.In the
DBA_OB_BACKUP_VALIDATE_TASK_HISTORYview, each Task corresponds to a validation task for a backup set (backup_set) or log archive piece (archive_piece).
To view backup validation results 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 execution results 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_JOB_HISTORY;The query statement in Oracle-compatible mode is as follows:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_JOB_HISTORY;An example of 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 task-level backup validation tasks, that is, the validation results 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_TASK_HISTORY;The query statement in Oracle-compatible mode is as follows:
obclient(SYS@oracletenant)[SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_VALIDATE_TASK_HISTORY;An example of 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
