Problems with using Xtrabackup in earlier versions to restore the full backup file created by Xtrabackup in later versions

Source: Internet
Author: User
Recently, we want to restore the data of multiple MySQLServer instances backed up using xtrabackup to another MySQL server and start multiple instances using different ports as the review environment.

Recently, we want to restore the data of multiple MySQL servers backed up by xtrabackup to another MySQL Server and start multiple instances using different ports as the review environment.

Recently, we want to restore the data of multiple MySQL servers backed up by xtrabackup to another MySQL Server and start multiple instances using different ports as the review environment. Several database instances fail to be started when the utility executes auto-Restore. Check the error log in the data directory and find the following startup error:

12:31:36 27876 [Note] Plugin 'federated 'is disabled.
12:31:36 27876 [Note] InnoDB: The InnoDB memory heap is disabled
12:31:36 27876 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
12:31:36 27876 [Note] InnoDB: Compressed tables use zlib 1.2.3
12:31:36 27876 [Note] InnoDB: Using CPU crc32 instructions
12:31:36 27876 [Note] InnoDB: Initializing buffer pool, size = 500.0 M
12:31:36 27876 [Note] InnoDB: Completed initialization of buffer pool
12:31:36 27876 [Note] InnoDB: Highest supported file format is Barracuda.
12:31:36 27876 [Note] InnoDB: The log sequence numbers 13637542590703 and 13637542590703 in ibdata files do not match the log sequence number 13637542595176 in the ib_logfiles!
12:31:36 27876 [Note] InnoDB: Database was not shutdown normally!
12:31:36 27876 [Note] InnoDB: Starting crash recovery.
12:31:36 27876 [Note] InnoDB: Reading tablespace information from the. ibd files...
12:31:37 27876 [Note] InnoDB: Restoring possible half-written data pages
12:31:37 27876 [Note] InnoDB: from the doublewrite buffer...
2015-02-02 12:31:37 2aeb2d96a590 InnoDB: Error: page 7 log sequence number 36755345241838
InnoDB: is in the future! Current system log sequence number 13637542595176.
InnoDB: Your database may be created upt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB:
InnoDB: for more information.
2015-02-02 12:31:37 2aeb2d96a590 InnoDB: Error: page 1 log sequence number 35468208055287
InnoDB: is in the future! Current system log sequence number 13637542595176.
InnoDB: Your database may be created upt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB:
InnoDB: for more information.
......

It means that the log serial number in the ibdata file is inconsistent with the log serial number in the ib_logfiles file, and the crash recovery process is started. The tablespace information is read from the. ibd file and the data page is restored from the dual-write buffer. However, the log serial number on the page is later than the current system log serial number. Indicates that the database may be damaged. Or only the tablespace is backup and no log files are backup. Therefore, the hypothetical error may occur in two phases: one is that the backup file itself is damaged, and the other is that the backup file itself is normal, and the application log is faulty.

Verify from a simple situation
Manually pull the xtrabackup full backup file from the previous day to perform the restoration step by step. The following error is reported:

......
150202 12:36:35 innobackupex: Connecting to MySQL server with DSN 'dbi: mysql:; mysql_read_default_file =/etc/my. cnf; mysql_read_default_group = xtrabackup 'as 'usvr _ serveradmin' (using password: YES ).
150202 12:36:35 innobackupex: Connected to MySQL server
Connected successfully
Can't call method "disconnect" on an undefined value at/usr/bin/innobackupex line 1482.
......

Normally, when the output is complete OK! So it was determined that there was a problem. All machines use the same restoration program for restoration. Why are there only a few such problems? As you can see, these machines are installed with MySQL version 5.6.21 and xtrabackup version 2.2.24. The MySQL Server instance to be restored is 5.6.12, And the xtrabackup version is 2.1.3.

Replace 2.1.3 with xtrabackup2.2.24 and then apply logs to the full backup file again. So the final problem is located here. That is to say, if you use a later version of xtrabackup to back up the full backup file, there will be problems when you use the earlier version of xtrabackup application logs. (It must be related to the MySQL Server version)

However, the problem persists. There are a few MySQL5.6.21 machines in some other machines, and the xtrabackup version is 2.2.24. Why is the restoration successful ?? Observe the databases of these machines and find that the databases are empty, so that there is no situation for full backup application logs. Therefore, the full backup recovery is successful.

To sum up, there is a problem when using the xtrabackup application logs of a later version.

MySQL management-using XtraBackup for Hot Backup

MySQL open-source backup tool Xtrabackup backup deployment

MySQL Xtrabackup backup and recovery

Use XtraBackup to implement MySQL master-slave replication and quick deployment [master-slave table lock-free]

Install and use Xtrabackup from Percona to back up MySQL

XtraBackup details: click here
XtraBackup: click here

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.