I’m testing out Percona XtraBackup 2.2 and ran into a problem the first time I tried to restore an incremental backup. I assume I’ve done something wrong; hopefully someone can tell me what that is, I’ve included all the details below.
Executive Summary:
The PREPARE of the first incremental backup fails with the following error:
2015-01-30 14:33:35 b735b700 InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 0:524293, should be 0:5!
Operating System = Ubuntu 14.04.01 (Bitnami Tomcat Stack)
Database = MySQL 5.5.38
Backup Steps
- Start up a virtual machine (V1) from image (V) and log in
- Create a full backup (B) of the database:
==> Successful, creates directory 2015-01-30_10-44-37
- Add a few records to the database
- Create an incremental backup (b1) of the database
==> Successful, creates directory 2015-01-30_10-59-30
- Add a few more records to the database
- Create an incremental backup (b2) of the database
==> Successful, creates directory 2015-01-30_11-06-54
- Disconnect the disk (D) with these backups on it from V1.
Restore Steps
My first testcase was to do a point in time restore the database on a new virtual machine V2 to the state after the first incremental backup (b1)
- Start up another virtual machine (V2) from image (V) and log in
- Connect the disk (D) to (V2).
- Prepare the base backup (B)
==> Works OK
- Prepare the incremental backup (b1)
==> At this point I get an error:
xtrabackup version 2.2.8 based on MySQL server 5.6.22 Linux (i686) (revision id: )
incremental backup from 19492498688 is enabled.
xtrabackup: cd to /mnt/mySQLDumps/BackupTesting/2015-01-30_10-44-37
xtrabackup: This target seems to be already prepared.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(19492581719)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /mnt/mySQLDumps/BackupTesting/2015-01-30_10-59-30
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
xtrabackup: Generating a list of tablespaces
xtrabackup: page size for /mnt/mySQLDumps/BackupTesting/2015-01-30_10-59-30/ibdata1.delta is 16384 bytes
Applying /mnt/mySQLDumps/BackupTesting/2015-01-30_10-59-30/ibdata1.delta to ./ibdata1…
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /mnt/mySQLDumps/BackupTesting/2015-01-30_10-59-30
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: Using atomics to ref count buffer pool pages
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Memory barrier is not used
InnoDB: Compressed tables use zlib 1.2.8
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, size = 100.0M
InnoDB: Completed initialization of buffer pool
2015-01-30 14:33:35 b735b700 InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 0:524293, should be 0:5!
2015-01-30 14:33:35 b735b700 InnoDB: Assertion failure in thread 3073750784 in file srv0start.cc line 1373
InnoDB: Failing assertion: prev_space_id + 1 == undo_tablespace_ids[i]
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: [url]http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html[/url]
InnoDB: about forcing recovery.
19:33:35 UTC - xtrabackup got signal 6 ;
This could be because you hit a bug or data is corrupted.
This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Thread pointer: 0xab7ff60
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong…
stack_bottom = 0 thread_stack 0x10000
xtrabackup(my_print_stacktrace+0x2d) [0x85a011d]
xtrabackup(handle_fatal_signal+0x270) [0x8439be0]
[0xb7760400]
[0xb7760424]
/lib/i386-linux-gnu/libc.so.6(gsignal+0x47) [0xb738b827]
/lib/i386-linux-gnu/libc.so.6(abort+0x143) [0xb738ec53]
xtrabackup(srv_undo_tablespaces_init(unsigned long, unsigned long, unsigned long, unsigned long*)+0x6a8) [0x8207ff8]
xtrabackup(innobase_start_or_create_for_mysql()+0xd86) [0x8208eb6]
xtrabackup() [0x81adde7]
xtrabackup(main+0x173f) [0x8197f8f]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb7376a83]
xtrabackup() [0x81ab151]
Please report a bug at [url]https://bugs.launchpad.net/percona-xtrabackup[/url]
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2633.
main::apply_log() called at /usr/bin/innobackupex line 1561
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/innobackupex line 2633.