MySQL Enterprise Backup User's Guide (Version 8.0.23)

4.2.3 Verifying a Backup

You can check the integrity of your backup using the validate command. The following is a sample command for validating a backup image and the output for the successful validation:

$ mysqlbackup --backup-image=/home/mysqlbackup/backups/my.mbi validate
MySQL Enterprise Backup  Ver 8.0.16-commercial for linux-glibc2.12 on x86_64 (MySQL Enterprise - Commercial)
Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Starting with following command line ...
 bin/mysqlbackup --backup-image=/home/mysqlbackup/backups/my.mbi validate 

IMPORTANT: Please check that mysqlbackup run completes successfully.
           At the end of a successful 'validate' run mysqlbackup
           prints "mysqlbackup completed OK!".

190401 17:27:14 MAIN    INFO: Starting to log actions.
190401 17:27:14 MAIN    INFO: Backup Image MEB version string: 8.0.16 [2019-03-26  18:51:33]
190401 17:27:14 MAIN    INFO: MySQL server version is '8.0.16'
190401 17:27:14 MAIN    INFO: TDE Keyring service initialized.
190401 17:27:14 MAIN    INFO: Creating 14 buffers each of size 16777216.
190401 17:27:14 MAIN    INFO: Validate operation starts with following threads
		1 read-threads    6 process-threads
190401 17:27:14 MAIN    INFO: Validating image ... /home/mysqlbackup/backups/my.mbi
190401 17:27:14 PCR1    INFO: Validate: [Dir]: meta
190401 17:27:14 PCR1    INFO: Validate: [Dir]: datadir/mysql
190401 17:27:14 PCR1    INFO: Validate: [Dir]: datadir/performance_schema
190401 17:27:14 PCR1    INFO: Validate: [Dir]: datadir/pets
190401 17:27:14 PCR1    INFO: Validate: [Dir]: datadir/sys
190401 17:27:14 MAIN    INFO: Total files as specified in image: 137
190401 17:27:14 MAIN    INFO: datadir/ibdata1 validated.
190401 17:27:14 MAIN    INFO: datadir/undo_002 validated.
190401 17:27:14 MAIN    INFO: datadir/undo_001 validated.
190401 17:27:14 MAIN    INFO: datadir/sys/sys_config.ibd validated.
190401 17:27:14 MAIN    INFO: datadir/pets/cats.ibd validated.
190401 17:27:14 MAIN    INFO: datadir/mysql/backup_history.ibd validated.
190401 17:27:14 MAIN    INFO: datadir/mysql.ibd validated.
190401 17:27:14 MAIN    INFO: Validate operation completed successfully.
190401 17:27:14 MAIN    INFO: Backup Image validation successful.
190401 17:27:14 MAIN    INFO: Source Image Path = /home/mysqlbackup/backups/my.mbi

mysqlbackup completed OK!

Furthermore, you can also verify that your backup has been successful by restoring the backup data on a different server and run the MySQL daemon (mysqld) on the new data directory. You can then execute SHOW statements to verify the database and table structures, and execute queries to verify further details of the database. See Section 4.2.4, “Restoring a Database” for the basic steps for restoring a backup, and see Chapter 5, Recovering or Restoring a Database for more detailed instructions.

Warning

Do not try to verify a backup by using the backup directory as a data directory to start a MySQL server. This will crash the server, and might also corrupt your backup. See Appendix A, Frequently Asked Questions for MySQL Enterprise Backup for details.