After the physical backup succeeds, you can verify the backup data or logs.
Considerations
Before you validate the backup data, make sure that the data to be verified meets the following requirements:
All backup data is generated upon a successful backup.
The backup data is not cleared.
Verify all backup sets and the corresponding logs of the current cluster
A backup set contains all the files backed up in a data backup task. OceanBase Database supports two backup types: full backup and incremental backup. In log splitting or non-splitting scenarios, you can perform the following steps to verify all backup sets and the corresponding logs:
Log on to the
systenant as therootuser.Execute the following statement to verify all backup sets and the corresponding logs:
obclient> ALTER SYSTEM VALIDATE DATABASE;
Verify a specified backup set in the current cluster
Log on to the
systenant as therootuser.Run the following command to verify the specified backup set:
Syntax:
obclient> ALTER SYSTEM VALIDATE BACKUPSET backup_set_id;backup_set_idis the ID of the backup set.
Verify specified logs in the current cluster
You can verify specified logs when they are split into pieces.
Log on to the
systenant as therootuser.Execute the following statement to verify the specified logs:
Syntax:
obclient> ALTER SYSTEM VALIDATE BACKUPPIECE backup_piece_id;backup_piece_idis thepiece_idof the log backup.Notice
This statement can only verify logs backed up after directory splitting and cannot verify logs backed up before directory splitting.
References
After you perform verification, you can query the corresponding views to check the verification results. For more information, see View data verification results.