Documentation Home
MySQL Enterprise Backup 4.1 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


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/admin/backups/my.mbi validate
MySQL Enterprise Backup version 4.1.0 Linux-2.6.39-400.215.10.el5uek-x86_64 [2017/02/13] 
Copyright (c) 2003, 2017, Oracle and/or its affiliates. All Rights Reserved.

170214 17:46:09 MAIN    INFO: A thread created with Id '139996701841216' 
170214 17:46:09 MAIN    INFO: Starting with following command line ...
 ./mysqlbackup --backup-image=/home/admin/backups/my.mbi validate 

170214 17:46:09 MAIN    INFO: 
IMPORTANT: Please check that mysqlbackup run completes successfully.
           At the end of a successful 'validate' run mysqlbackup
           prints "mysqlbackup completed OK!".

170214 17:46:09 MAIN    INFO: Backup Image MEB version string: 4.1.0 [2017/02/13]
170214 17:46:09 MAIN    INFO: MySQL server version is '5.7.17'
170214 17:46:09 MAIN    INFO: Creating 14 buffers each of size 16777216.
170214 17:46:09 MAIN    INFO: Validate operation starts with following threads
		1 read-threads    6 process-threads
170214 17:46:09 MAIN    INFO: Validating image ... /home/admin/backups/my.mbi
170214 17:46:09 PCR1    INFO: A thread created with Id '139996431771392' 
170214 17:46:09 PCR2    INFO: A thread created with Id '139996423378688' 
170214 17:46:09 PCR3    INFO: A thread created with Id '139996414985984' 
170214 17:46:09 PCR4    INFO: A thread created with Id '139996406593280' 
170214 17:46:09 PCR5    INFO: A thread created with Id '139996263982848' 
170214 17:46:09 PCR6    INFO: A thread created with Id '139996398200576' 
170214 17:46:09 RDR1    INFO: A thread created with Id '139996440164096' 
170214 17:46:09 PCR1    INFO: Validate: [Dir]: meta
170214 17:46:10 PCR4    INFO: Validate: [Dir]: datadir/mysql
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/performance_schema
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/pets
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/sys
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/mysql
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/performance_schema
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/pets
170214 17:46:10 PCR2    INFO: Validate: [Dir]: datadir/sys
170214 17:46:10 MAIN    INFO: Total files as specified in image: 297
170214 17:46:10 MAIN    INFO: datadir/ibdata1 validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/engine_cost.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/gtid_executed.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/help_category.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/help_keyword.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/help_relation.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/help_topic.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/innodb_index_stats.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/innodb_table_stats.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/plugin.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/server_cost.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/servers.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/slave_master_info.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/slave_relay_log_info.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/slave_worker_info.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/time_zone.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/time_zone_leap_second.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/time_zone_name.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/time_zone_transition.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/mysql/time_zone_transition_type.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/pets/cats.ibd validated.
170214 17:46:10 MAIN    INFO: datadir/sys/sys_config.ibd validated.
170214 17:46:10 MAIN    INFO: Validate operation completed successfully.
170214 17:46:10 MAIN    INFO: Backup Image validation successful.
170214 17:46:10 MAIN    INFO: Source Image Path = /home/admin/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.