Failed to prepare incremental backup if general tablespace has been recreated between backups
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB | Status tracked in 2.4 | |||||
2.4 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
Simple case:
1. Create general tablespace:
mysql> CREATE TABLESPACE `ts1` ADD DATAFILE '/var/lib/
2. Take full backup:
./xtrabackup --defaults-
3. Drop and recreate with different page size:
mysql> CREATE TABLESPACE `ts1` ADD DATAFILE '/var/lib/
Query OK, 0 rows affected (0,03 sec)
4. Take incremental backup:
./xtrabackup --defaults-
5. Prepare full & inc backups:
./xtrabackup --defaults-
./xtrabackup --defaults-
incremental backup from 9216231610 is enabled.
xtrabackup: cd to /home/backup_
xtrabackup: This target seems to be already prepared with --apply-log-only.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 17 for mysql/slave_
xtrabackup: page size for /home/backup_
Applying /home/backup_
xtrabackup: page size for /home/backup_
xtrabackup: Renaming ts1 to (null)/
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: File ./ts1.ibd: 'rename' returned OS error 71.
xtrabackup: Cannot rename ts1 to (null)/
xtrabackup: error: cannot open ./ts1.ibd
xtrabackup: Error: xtrabackup_
[root@mysql-57 bin]# perror 71
OS error code 71: Protocol error
Changed in percona-xtrabackup: | |
importance: | Medium → High |
Changed in percona-xtrabackup: | |
importance: | Medium → High |
summary: |
- Failed to prepare incremental backup if page size of general tablespace - has changed between backups + Failed to prepare incremental backup if general tablespace has been + recreated between backups |
The most easy way to reproduce:
mysql> create tablespace ts3 add datafile 'ts3.ibd' engine=innodb;
Query OK, 0 rows affected (0,02 sec)
Then take Full backup:
./xtrabackup --defaults- file=/etc/ my.cnf --backup --datadir= /var/lib/ mysql/ --target- dir=/home/ backup_ dir/full/ --user=root --password= Baku12345# --no-version-check
Then drop ts3 tablespace and create in remote folder:
mysql> drop tablespace ts3;
Query OK, 0 rows affected (0,00 sec)
mysql> create tablespace ts3 add datafile '/home/ tablespaces/ ts3.ibd' engine=innodb;
Query OK, 0 rows affected (0,01 sec)
Take incremental backup:
./xtrabackup --defaults- file=/etc/ my.cnf --backup --target- dir=/home/ backup_ dir/inc/ inc1 --incremental- basedir= /home/backup_ dir/full --datadir= /var/lib/ mysql/ --user=root --password= Baku12345# --no-version-check
Prepare:
./xtrabackup --defaults- file=/home/ backup_ dir/full/ backup- my.cnf --prepare --apply-log-only --target- dir=/home/ backup_ dir/full
./xtrabackup --defaults- file=/home/ backup_ dir/full/ backup- my.cnf --prepare --target- dir=/home/ backup_ dir/full --incremental- dir=/home/ backup_ dir/inc/ inc1
incremental backup from 2619657407 is enabled. dir/full (2619658455) data_home_ dir = . data_file_ path = ibdata1: 12M:autoextend log_group_ home_dir = /home/backup_ dir/inc/ inc1 log_files_ in_group = 1 log_file_ size = 8388608 dir/inc/ inc1/ibdata1. delta is 16384 bytes dir/inc/ inc1/ibdata1. delta to ./ibdata1... dir/inc/ inc1/ts3. ibd.delta is 16384 bytes xtrabackup_ tmp_#32. ibd xtrabackup_ tmp_#32 apply_delta( ): failed to apply /home/backup_ dir/inc/ inc1/ts3. ibd.delta to ./ts3.ibd.
xtrabackup: cd to /home/backup_
xtrabackup: This target seems to be already prepared with --apply-log-only.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 26 for dbtest/sbtest1, old maximum was 0
xtrabackup: page size for /home/backup_
Applying /home/backup_
xtrabackup: page size for /home/backup_
xtrabackup: Renaming ts3 to (null)/
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: File ./ts3.ibd: 'rename' returned OS error 71.
xtrabackup: Cannot rename ts3 to (null)/
xtrabackup: error: cannot open ./ts3.ibd
xtrabackup: Error: xtrabackup_