How to restore a single InnoDB database table in the original MySQL

Source: Internet
Author: User
Tags table definition percona percona server backup

The xtrabackup in Percona is really a good tool to simply introduce his features:

1, create hot backup (mainly rely on InnoDB crash recovery function)

2. Incremental backup

3, directly to the backup file compression package

4. Small load

The problem was found when testing the latest version 2.0:

This tool in importing and exporing individual tables does not work with Oracle's original MySQL.

This column more highlights: http://www.bianceng.cn/database/MySQL/

Explained as follows: In the original MySQL is not allowed to move the database. IDB file, the official explanation is: The table definition this is stored in the InnoDB shared tablespace includes the Database name, and Becauseinnodb must preserve the consistency of transaction IDs and log sequence numbers. That is, the table definition is stored in a shared tablespace in InnoDB, and the transaction ID and log sequence number are placed in a single table space file. (This restriction has been removed in the Percona server)

After consultation: This tool for the original MySQL is still available. Specifically as follows:

To back up a single table:

Innobackupex--tables-file=/tmp/tables.txt/path/to/backup

The key is the following step:

--export First Use this option to obtain a fully independent IDB file (not officially mentioned)

Innobackupex--defaults-file=/usr/local/mysql/my.cnf--export/tmp

The following is a consistent backup of the application log:

Innobackupex--defaults-file=/usr/local/mysql/my.cnf--export--apply-log/path/to/backup

Finally, import tablespace;

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.