Backup and recovery using XtrabBackup

Source: Internet
Author: User

Xtrabackup ------ A required MySQL DBA Tool

Note:

1) Documents Reference http://www.percona.com/docs/wiki/percona-xtrabackup:start

2) mysql version 5.1.50 or later.

1. Introduction and installation of Xtrabackup

1. Xtrabackup is an open-source project of percona. It supports hot backup of innodb, XtraDB, and MyISAM (locks tables). It can be seen as a free alternative to InnoDB Hotbackup.

Percona Support for MySQL

Benefit Silver
(Per Server)
Gold
(Unlimited)
Platinum
(Unlimited)
Annual Price $1,500/server From $15,000. From $30,000.
Number of Servers Covered Per-Server Unlimited Unlimited
Number of Support Incidents Unlimited Unlimited Unlimited
Response Time SLA 60 Minutes 30 Minutes 30 Minutes
Named Support Contact Persons 5 10 20
Email, Web, & Chat Support
Phone Support
Login Support
24 × 7 Support
Fixes For Verified Bugs  
Hot Bug Fixes    
Onsite System Audit   Option
Covers Old Server Versions    
Covers Non-Standard Platforms     Option
Covers Custom Code     Option

Reference: http://www.percona.com/mysql-support/
 
 
 
First, let's take a look at how to install Xtrabackup. The simplest installation method is to use the RPM package. However, if you want to use the source code for installation, the installation method is a bit odd, it is installed by patching the MySQL source code.
 
2. installation:
 
Wget http://www.percona.com/downloads/XtraBackup/XtraBackup-1.4/Linux/binary/i686/
 
Tar zxf xtrabackup-1.4.tar.gz
 
Cd xtrabackup-1.4
 
./Configure
 
Make
 
At this point, do not make install. Then MySQL will be installed. The correct method is:
 
Cd innobase/xtrabackup/
 
Make
 
Make install
 
Installation Reference: http://www.percona.com/docs/wiki/percona-xtrabackup:installation:from-source
 
3. In this way, two useful tools will be installed in the/usr/bin directory: xtrabackup and innobackupex.
 
1) xtrabackup can only back up InnoDB and XtraDB data tables. It supports online hot backup and can back up Innodb data tables without locking. However, this tool cannot operate Myisam engine tables.
 
2) innobackupex is a script encapsulation that encapsulates xtrabackup and can simultaneously process Innodb and Myisam, but a read lock is required when processing Myisam.
 
 
 
As described above, because the read lock is required for Myisam operations, this will block write operations for online services, and Innodb does not have such restrictions, so the proportion of Innodb table types in the database is greater, it is more advantageous. In actual application, the innobackupex method is generally used directly. There are three main operation methods, as described in the Manual:
 

 

Usage:
 
Innobackup [-- sleep = MS] [-- compress [= LEVEL] [-- include = REGEXP] [-- user = NAME]
 
[-- Password = WORD] [-- port = PORT] [-- socket = SOCKET] [-- no-timestamp]
 
[-- Ibbackup = IBBACKUP-BINARY] [-- slave-info] [-- stream = tar]
 
[-- Defaults-file = MY. CNF]
 
[-- Databases = LIST] [-- remote-host = HOSTNAME] BACKUP-ROOT-DIR
 
Innobackup -- apply-log [-- use-memory = MB] [-- uncompress] [-- defaults-file = MY. CNF]
 
[-- Ibbackup = IBBACKUP-BINARY] BACKUP-DIR
 
Innobackup -- copy-back [-- defaults-file = MY. CNF] BACKUP-DIR
 
----------------------------------
 
The first command line is to hot back up the mysql database.
 
The command with the -- apply-log option is to start the mysql service on a backup.
 
Commands with the -- copy-back option copy data, indexes, and logs from the backup directory to the specified initial location in the my. cnf file.
 
Xtrabackup can also be used to moving InnoDB tables between servers. For more information, see the official documentation and examples.

Reference link:
 
1. Documents: http://www.percona.com/docs/wiki/percona-xtrabackup:xtrabackup_manual
 
2. Xtrabackup online backup for InnoDB/XTraDB (pdf ):
 
Http://www.percona.com/ppc2009/PPC2009_xtrabackup.pdf
 
Recommended reading:

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

Continue to read:

  • 1
  • 2
  • Next Page

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.