InnoDB Hot Backup Utility Bug
Feb 24, 2009 / By Singer Wang
If you are using InnoDB Hot Backup utility and the innobackup.pl wrapper script, be very careful if you are not running backups under the system
mysql user. There is a bug which causes InnoDB Hot Backup to sometimes report a successful backup when it actually failed.
The last few dozen lines of the output was from the backup was (after generalizing the db and table names):
InnoDB: File name /var/lib/mysql/data/dbname/TABLE_A.frm InnoDB: File operation call: 'stat'. 090210Â 3:55:00Â InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name /var/lib/mysql/data/dbname/TABLE_B.frm InnoDB: File operation call: 'stat'. 090210Â 3:55:00Â InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name /var/lib/mysql/data/dbname/TABLE_C.frm InnoDB: File operation call: 'stat'.ibbackup: Compressed 283920 MB of data files to 67407 MB (compression 76%). 090210Â 3:55:00Â ibbackup: Full backup completed! 090210 03:55:04Â innobackup: All tables unlocked 090210 03:55:04Â innobackup: Connection to database server closed innobackup: Backup created in directory '/backup/hot_backup/working/2009-02-09_22-01-38' innobackup: MySQL binlog position: filename 'db02-binlog.000271', position 513645354 090222 21:25:37Â innobackup: innobackup completed OK!
Despite the fact that there were problems reading the
.frm files, both
innobackup.pl report that the backup was completely successfully. The
ibbackup program reports the error when it reads the
.frm during the backup of the
ibdata files and the
innobackup.pl reports the errors when it tries to copy the
.frm files. Manual verification of the backup confirmed that that the
.frm was not backed up, as expected with the given error.
Further investigating the error, that there are two conditions to trigger the bug: 1) the backup must not be running under the system
mysql user; and 2) one or more of the data directories for the database is readable to the user running the backup but not executable.
This bug has been submitted to Innobase at their forums.
Leave a Reply
You must be logged in to post a comment.