After a physical backup is successful, you can validate all backup sets and archive pieces under the current backup and archive paths of user tenants. You can validate backups for all user tenants in a cluster or for a single tenant.
Limitations and considerations
This topic applies only to validating all backup sets and log archive pieces under the currently specified paths in
DATA_BACKUP_DESTandLOG_ARCHIVE_DESTfor tenants within the current cluster. To validate a specified backup set or log archive piece under the current backup or archive path, see Validate a specified backup set or log archive piece.Additionally, for scenarios where the backup or archive destination has been changed, if you need to validate data under the original backup or archive path, see Validate backup sets or log archive pieces in a specified path.
Since validation tasks frequently access backup media to read data, thereby competing for network resources of the backup task, it is recommended to execute validation tasks when no backup tasks are being performed by user tenants and the system load is low.
When specifying the backup validation level:
For V4.4.2, backup sets and log archive pieces from versions earlier than V4.4.2 BP2 (excluding V4.4.2 BP2) do not support Basic validation, meaning file integrity validation is not supported.
For backup sets from versions earlier than V4.3.4 (excluding V4.3.4), Physical validation is not supported, meaning validation of physical data correctness and logical consistency is not supported.
Initiate backup validation for a user tenant's entire backup and archive path from the system tenant (sys tenant)
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***** -AExecute the following statement to initiate backup validation.
The statement is as follows:
ALTER SYSTEM VALIDATE BACKUP [LEVEL= { 'basic' | 'physical' }] [TENANT = tenant_name];The relevant parameters in the statement are described as follows:
LEVEL: Optional. Specifies the validation level. If not specified, the default value isphysical. Valid values:basic: Verifies only the integrity of the file list.physical: Verifies the correctness of physical data and logical consistency.
TENANT: Optional. Specifies the user tenant to validate. If not specified, all user tenants in the cluster are validated.
Examples:
The system tenant (
systenant) initiates Basic validation for all backup sets and archive pieces under the current backup and archive paths of all user tenants in the cluster.obclient(root@sys)[(none)]> ALTER SYSTEM VALIDATE BACKUP LEVEL = 'basic';The system tenant (
systenant) initiates Physical validation for all backup sets and archive pieces under the current backup and archive paths of the specified user tenantmysqltenant.obclient(root@sys)[(none)]> ALTER SYSTEM VALIDATE BACKUP LEVEL = 'physical' TENANT = mysqltenant;
After the statement is executed successfully, you can view the status, progress, and execution results of the validation task through the
CDB_OB_BACKUP_VALIDATE_JOBS,CDB_OB_BACKUP_VALIDATE_TASKS,CDB_OB_BACKUP_VALIDATE_JOB_HISTORY, andCDB_OB_BACKUP_VALIDATE_TASK_HISTORYviews.For detailed operations and information on viewing backup validation progress, see View backup validation progress.
For detailed operations and information on viewing backup validation results, see View backup validation results.
User tenant initiates backup validation for its entire backup and archive path
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-compatible 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***** -AExecute the following statement to initiate backup validation.
The statement is as follows:
ALTER SYSTEM VALIDATE BACKUP [LEVEL = { 'basic' | 'physical' }];In the statement,
LEVELis an optional parameter that indicates the validation level. If not specified, the default value isphysical. Levels include:basic: checks only the integrity of the file list.physical: checks the correctness of physical data and logical consistency.
The following example initiates Basic validation for all backup sets and archive pieces under the current backup and archive paths of the current tenant:
obclient> ALTER SYSTEM VALIDATE BACKUP LEVEL = 'basic';After the statement is executed successfully, you can view the status, progress, and execution results of the validation task through the
DBA_OB_BACKUP_VALIDATE_JOBS,DBA_OB_BACKUP_VALIDATE_TASKS,DBA_OB_BACKUP_VALIDATE_JOB_HISTORY, andDBA_OB_BACKUP_VALIDATE_TASK_HISTORYviews.For detailed operations and information on viewing backup validation progress, see View backup validation progress.
For detailed operations and information on viewing backup validation results, see View backup validation results.
