Applying incremental backup using xtrabackup 2.0.3 fails when innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend is set in [mysqld]

Bug #1062684 reported by Jaime Sicam
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Critical
Sergei Glushchenko
2.0
Fix Released
Critical
Sergei Glushchenko
2.1
Fix Released
Critical
Sergei Glushchenko

Bug Description

If in your [mysqld] section of my.cnf, this is set:
innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend

innobackupex cannot apply incremental backup:

innobackupex --apply-log --redo-only --incremental-dir=/backups/incremental/2012-10-05_21-23-37 /backups/full/2012-10-05_21-22-
00

121005 21:31:47 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="/backups/full/2012-10-05_21-22-00/backup-my.cnf" --defaults-group="mysqld" --prepare --target-dir=/backups/full/2012-10-05_21-22-00 --apply-log-only --incremental-dir=/backups/incremental/2012-10-05_21-23-37

xtrabackup_55 version 2.0.3 for Percona Server 5.5.16 Linux (x86_64) (revision id: 470)
incremental backup from 416883306 is enabled.
xtrabackup: cd to /backups/full/2012-10-05_21-22-00
xtrabackup: This target seems to be already prepared.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(416883306)
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /backups/incremental/2012-10-05_21-23-37
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
121005 21:31:47 InnoDB: Using Linux native AIO
InnoDB: Error: data file ./ibdata1 is of a different size
InnoDB: 128000 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 2000 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!
xtrabackup: error: xb_data_files_init() failed witherror code 11
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/innobackupex line 378.

Workaround:
Install xtrabackup-2.0.1 to apply incremental backup

Tags: i25967

Related branches

Jaime Sicam (jssicam)
tags: added: i25967
Jaime Sicam (jssicam)
description: updated
Revision history for this message
Alexey Kopytov (akopytov) wrote :

This is a regression in 2.0.2 from the fix for bug #932623.

Verified with the following changes to ib_incremental.sh:

--- t/ib_incremental.sh 2012-08-20 13:07:20.000000000 +0400
+++ t/bug1062684.sh 2012-10-09 16:46:43.000000000 +0400
@@ -1,8 +1,11 @@
 . inc/common.sh

-start_server --innodb_file_per_table
+start_server --innodb_file_per_table --innodb-data-file-path="ibdata1:10M;ibdata2:5M:autoextend" --innodb_log_file_size=1048576
 load_dbase_schema incremental_sample

+echo "innodb-data-file-path=ibdata1:10M;ibdata2:5M:autoextend" >>$topdir/my.cnf
+echo "innodb_log_file_size=1048576" >> $topdir/my.cnf
+
 # Adding initial rows
 vlog "Adding initial rows to database..."
 numrow=100

Revision history for this message
Claudio Nanni (claudio.nanni) wrote :

I have the same, either with multiple(more than 1) tablespaces files or if the only one (ibdata1) was autoextended by inserting more data than the initial file size (10M).

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

There are two missing things which lead to this bug
1
. srv_data_file_sizes array is not set before applying incremental backup
2. tablespace may consist of several file nodes which is not taken into account in xb_delta_open_matching_space

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-236

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.