Add a test case for partial streaming backups + multiple tablespaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Low
|
Unassigned | ||
2.0 |
Won't Fix
|
Low
|
Unassigned | ||
2.1 |
Triaged
|
Low
|
Unassigned | ||
2.2 |
Triaged
|
Low
|
Unassigned | ||
2.3 |
Triaged
|
Low
|
Unassigned |
Bug Description
When doing a partial streaming backup using xbstream, upon extracting the archive it reports the following error:
xb_stream_
This error seems spurious to me because I am able to successfully prepare the backup without any issues.
The XtraBackup version is:
[root@centos6_01 backup_test]# xtrabackup --version
xtrabackup version 2.0.5 for Percona Server 5.1.59 unknown-linux-gnu (x86_64) (revision id: 499)
The Percona Server version is:
[root@centos6_01 backup_test]# /usr/sbin/mysqld --version
/usr/sbin/mysqld Ver 5.5.29-29.4 for Linux on x86_64 (Percona Server (GPL), Release rel29.4, Revision 401)
The steps that were taken:
[root@centos6_01 backup_test]# innobackupex --stream=xbstream ./ --include=test.* > backup_
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130314 11:18:32 innobackupex: Starting mysql with options: --unbuffered --
130314 11:18:32 innobackupex: Connected to database with mysql child process (pid=6151)
130314 11:18:38 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.5.29, for Linux (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
innobackupex: Created backup directory /root/backup_test
130314 11:18:38 innobackupex: Starting mysql with options: --unbuffered --
130314 11:18:38 innobackupex: Connected to database with mysql child process (pid=6181)
130314 11:18:40 innobackupex: Connection to database server closed
130314 11:18:40 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-
innobackupex: Waiting for ibbackup (pid=6189) to suspend
innobackupex: Suspend file '/tmp/xtrabacku
xtrabackup_55 version 2.0.5 for Percona Server 5.5.16 Linux (x86_64) (revision id: 499)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: using O_DIRECT
xtrabackup: tables regcomp(test.*): Success
130314 11:18:40 InnoDB: Warning: allocated tablespace 15, old maximum was 9
>> log scanned up to (23311379)
[01] Streaming ./ibdata1
[01] ...done
[01] Streaming ./test/t2.ibd
[01] ...done
[01] Streaming ./test/t3.ibd
[01] ...done
[01] Streaming ./test/
[01] ...done
130314 11:18:41 innobackupex: Continuing after ibbackup has suspended
130314 11:18:41 innobackupex: Starting mysql with options: --unbuffered --
130314 11:18:41 innobackupex: Connected to database with mysql child process (pid=6203)
130314 11:18:43 innobackupex: Starting to lock all tables...
>> log scanned up to (23311379)
>> log scanned up to (23311379)
130314 11:18:53 innobackupex: All tables locked and flushed to disk
130314 11:18:53 innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/var/lib/mysql'
percona.
percona.db.opt is skipped because it does not match test.*.
innobackupex: Backing up files '/var/lib/
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
performance_
innobackupex: Backing up file '/var/lib/
innobackupex: Backing up file '/var/lib/
innobackupex: Backing up file '/var/lib/
innobackupex: Backing up file '/var/lib/
innobackupex: Backing up files '/var/lib/
mysql.db.MYI is skipped because it does not match test.*.
mysql.func.MYD is skipped because it does not match test.*.
mysql.user.MYD is skipped because it does not match test.*.
mysql.proc.MYI is skipped because it does not match test.*.
mysql.time_
mysql.time_
mysql.help_
mysql.help_
mysql.general_
mysql.time_
mysql.event.frm is skipped because it does not match test.*.
mysql.func.frm is skipped because it does not match test.*.
mysql.db.MYD is skipped because it does not match test.*.
mysql.servers.MYD is skipped because it does not match test.*.
mysql.help_
mysql.time_
mysql.user.MYI is skipped because it does not match test.*.
mysql.help_
mysql.time_
mysql.help_
mysql.servers.MYI is skipped because it does not match test.*.
mysql.slow_log.CSV is skipped because it does not match test.*.
mysql.proc.frm is skipped because it does not match test.*.
mysql.time_
mysql.help_
mysql.procs_
mysql.slow_log.frm is skipped because it does not match test.*.
mysql.user.frm is skipped because it does not match test.*.
mysql.ndb_
mysql.slow_log.CSM is skipped because it does not match test.*.
mysql.plugin.frm is skipped because it does not match test.*.
mysql.help_
mysql.plugin.MYI is skipped because it does not match test.*.
mysql.procs_
mysql.columns_
mysql.columns_
mysql.func.MYI is skipped because it does not match test.*.
mysql.event.MYD is skipped because it does not match test.*.
mysql.time_zone.MYI is skipped because it does not match test.*.
mysql.time_
mysql.host.MYD is skipped because it does not match test.*.
mysql.time_
mysql.help_
mysql.general_
mysql.help_
mysql.proxies_
mysql.proxies_
mysql.plugin.MYD is skipped because it does not match test.*.
mysql.time_
mysql.servers.frm is skipped because it does not match test.*.
mysql.proxies_
mysql.ndb_
mysql.time_zone.MYD is skipped because it does not match test.*.
mysql.time_
mysql.columns_
mysql.time_
mysql.time_zone.frm is skipped because it does not match test.*.
mysql.tables_
mysql.help_
mysql.help_
mysql.tables_
mysql.tables_
mysql.procs_
mysql.event.MYI is skipped because it does not match test.*.
mysql.host.MYI is skipped because it does not match test.*.
mysql.time_
mysql.general_
mysql.ndb_
mysql.db.frm is skipped because it does not match test.*.
mysql.host.frm is skipped because it does not match test.*.
mysql.help_
mysql.proc.MYD is skipped because it does not match test.*.
130314 11:18:53 innobackupex: Finished backing up non-InnoDB tables and files
130314 11:18:53 innobackupex: Waiting for log copying to finish
xtrabackup: The latest check point (for incremental): '23311379'
xtrabackup: Stopping log copying thread.
..>> log scanned up to (23311379)
xtrabackup: Streaming transaction log from a temporary file...
xtrabackup: Done.
xtrabackup: Transaction log of lsn (23311379) to (23311379) was copied.
130314 11:18:56 innobackupex: All tables unlocked
130314 11:18:56 innobackupex: Connection to database server closed
innobackupex: Backup created in directory '/root/backup_test'
innobackupex: MySQL binlog position: filename '', position
130314 11:18:57 innobackupex: completed OK!
[root@centos6_01 backup_test]# rm -rf uncompress/*
[root@centos6_01 backup_test]# xbstream -x -C uncompress/ < backup_
xb_stream_
The MySQL datadir that is backed up is attached to the ticket.
The interesting thing to note is that if I take a complete dump of MySQL data using mysqldum, clean the MySQL datadir and import the dump and then run Xtrabackup, then the resultant archive is extracted without any error.
summary: |
- Streaming partial backup when extracted throws the error - xb_stream_read_chunk(): wrong chunk magic at offset 0x1b3990e + Add a test case for partial streaming backups + multiple tablespaces |
The output from preparing the uncompressed archive that xbstream reported an error on:
[root@centos6_01 backup_test]# echo "innodb_ file_per_ table=1" >> uncompress/ backup- my.cnf
[root@centos6_01 backup_test]# innobackupex --apply-log --export uncompress/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
option_ ibbackup_ binary is autodetect, trying to connect to MySQL
Connected to MySQL with pid 6286
130314 11:31:55 innobackupex: Connection to database server closed
Connected successfully
130314 11:31:55 innobackupex: Starting mysql with options: --unbuffered --
130314 11:31:55 innobackupex: Connected to database with mysql child process (pid=6290)
130314 11:32:01 innobackupex: Connection to database server closed
IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
130314 11:32:01 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults- file="/ root/backup_ test/uncompress /backup- my.cnf" --defaults- group=" mysqld" --prepare --target- dir=/root/ backup_ test/uncompress --export
xtrabackup_55 version 2.0.5 for Percona Server 5.5.16 Linux (x86_64) (revision id: 499) test/uncompress (23311379) data_home_ dir = ./ data_file_ path = ibdata1: 10M:autoextend log_group_ home_dir = ./ log_files_ in_group = 1 log_file_ size = 2097152 data_home_ dir = ./ data_file_ path = ibdata1: 10M:autoextend log_group_ home_dir = ./ log_files_ in_group = 1 log_file_ size = 2097152 deadlocks. ibd'!
xtrabackup: cd to /root/backup_
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
130314 11:32:01 InnoDB: The InnoDB memory heap is disabled
130314 11:32:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130314 11:32:01 InnoDB: Compressed tables use zlib 1.2.3
130314 11:32:01 InnoDB: Initializing buffer pool, size = 100.0M
130314 11:32:01 InnoDB: Completed initialization of buffer pool
130314 11:32:01 InnoDB: highest supported file format is Barracuda.
130314 11:32:02 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
130314 11:32:02 InnoDB: Error: trying to open a table, but could not
InnoDB: open the tablespace file './percona/
InnoDB: It will be removed from data dictionary.
130314 11:32:03 InnoDB: Waiting for the background threads to start...