19.4 Validation Operations

To ensure the integrity of the backup data, MySQL Enterprise Backup provides a validate command for validating a backup by the checksum values of its data pages after the backup is created or transferred to another system.

Press CTRL+C to copy
mysqlbackup [STD-OPTIONS] [--backup-dir=PATH][--backup-image=IMAGE] [MESSAGE-LOGGING-OPTIONS] [PROGRESS-REPORT-OPTIONS] [CLOUD-STORAGE-OPTIONS] validate

validate

Verifies that a backup is not corrupted, truncated, or damaged. This operation validates the checksum value for each data page in a backup.

To avoid spending excessive time and resources on files that are too heavily corrupted, mysqlbackup stops validating a .ibd file after more than twenty corrupted pages are found in it, and proceeds to the next file instead. In that case, the operation's summary will not give a full count of corrupted pages, but only says at least 20 pages are corrupted.

The operation also has the following limitations:

  • If any .ibd files or .sdi files are missing from the data directory during a backup or have been deleted from a backup after the backup was made, the validate operation will not be able to detect the problem.

  • If a backup has been corrupted by removing or truncating pages from any of the .ibd files inside , the validate operation will not be able to detect the problem.

  • For any backup directory, the operation can only validate the InnoDB data files (ibdata* and *.ibd files) in it. Problems with other file types within a backup directory (for example, .sdi file corruptions) are not detected.

Here is a sample command for validating a backup image:

Press CTRL+C to copy
mysqlbackup -uroot --backup-image=/logs/fullimage.mi validate

Advanced: Here is a sample command for validating a backup directory:

Press CTRL+C to copy
mysqlbackup -uroot --backup-dir=/logs/backupext validate

For more usage examples for the validate command, see Section 4.2.3, “Verifying a Backup”