BUG - Restore a Compact backup with multiple ibdata

55 views
Skip to first unread message

Davide Belloni

unread,
Mar 12, 2015, 11:39:41 AM3/12/15
to percona-d...@googlegroups.com
Hi,
It seems that I'm hitting a bug when Mysql Server has multiple ibdata files (for example "innodb_data_file_path = ibdata1:10M;ibdata2:10M:autoextend") and I restore a Compact backup.

Here it's the innobackupx output:

root@localhost # innobackupex --apply-log --rebuild-indexes 2015-03-12_16-27-45/
 
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
150312 16:28:00  innobackupex: Starting the apply-log operation
IMPORTANT: Please check that the apply-log run completes successfully.
           At the end of a successful apply-log run innobackupex
           prints "completed OK!".
xtrabackup: /lib64/libz.so.1: no version information available (required by xtrabackup)
150312 16:28:00  innobackupex: Starting ibbackup with command: xtrabackup  --defaults-file="/mysql/2015-03-12_16-27-45/backup-my.cnf"  --defaults-group="mysqld" --prepare --target-dir=/mysql/2015-03-12_16-27-45 --rebuild-indexes
xtrabackup: /lib64/libz.so.1: no version information available (required by xtrabackup)
xtrabackup version 2.2.9 based on MySQL server 5.6.22 Linux (x86_64) (revision id: )
xtrabackup: cd to /mysql/2015-03-12_16-27-45
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(370979569)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = ./
xtrabackup:   innodb_data_file_path = ibdata1:10M;ibdata2:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 1
xtrabackup:   innodb_log_file_size = 2097152
Starting to expand compacted .ibd files.
InnoDB: Data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file 10 pages!
xtrabackup: Could not open or create data files.
xtrabackup: If you tried to add new data files, and it failed here,
xtrabackup: you should now edit innodb_data_file_path in my.cnf back
xtrabackup: to what it was, and remove the new ibdata files InnoDB created
xtrabackup: in this failed attempt. InnoDB only wrote those files full of
xtrabackup: zeros, but did not yet use them in any way. But be careful: do not
xtrabackup: remove old data files which contain your precious data!
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2642
main::apply_log() called at /usr/bin/innobackupex line 1570
innobackupex: Error: 
innobackupex: ibbackup failed at /usr/bin/innobackupex line 2642.

Xtrabackup version: 2.2.9

Thanks

Davide Belloni

unread,
Mar 12, 2015, 12:18:55 PM3/12/15
to percona-d...@googlegroups.com
Maybe this patch resolve the problem:

--- ./storage/innobase/srv/srv0start.cc 2015-02-13 15:52:11.000000000 +0100
+++ ./storage/innobase/srv/srv0start.dan 2015-03-12 17:04:13.000000000 +0100
@@ -977,7 +977,7 @@
  srv_data_file_sizes[i] = rounded_size_pages;
  }
 
- if (rounded_size_pages != srv_data_file_sizes[i]) {
+ if ((ulong) rounded_size_pages != (ulong) srv_data_file_sizes[i]) {
 
  ib_logf(IB_LOG_LEVEL_ERROR,
  "Data file %s is of a different "
Reply all
Reply to author
Forward
0 new messages