MySQLXtrabackup backup and recovery _ MySQL

Source: Internet
Author: User
Tags percona
MySQLXtrabackup backup and recovery bitsCN.com Xtrabackup is a data backup tool for InnoDB. it supports online hot backup (which does not affect data reading and writing during backup) and is a good alternative to InnoDB Hotbackup. Xtrabackup has two main tools: xtrabackup and innobackupex. xtrabackup can only back up InnoDB and XtraDB data tables. innobackupex encapsulates xtrabackup and can back up MyISAM data tables. 1. install mysql 2. install Xtrabackup and download the Xtrabackup configuration source # vi/etc/yum. repos. d/percona. repo Java code [percona] name = CentOS $ releasever-Percona baseurl = http://repo.percona.com/centos/ $ Releasever/OS/$ basearch/enabled = 1 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-percona Gpgcheck = 1 add key # cd/etc/pki/rpm-gpg # wget http://www.percona.com/downloads/RPM-GPG-KEY-percona Install Xtrabackup yum install xtrabackup 3 backup # xtrabackup -- backup -- datadir =/var/lib/mysql/-- target-dir =/data/backups/mysql/4 recover backup data. stop MySQL service: $/etc/init. d/mysqld stop or service mysql stop B. modify my. cnf datadir to the backup directory: datadir =/data/backups/mysql/c. start MySQL service: $/etc/init. d/mysqld start the latter service mysql start is quite simple. as for incremental backup, the directory xtrabackup -- backup -- target-dir =/data/backups/inc1 -- incremental-basedir =/data/backups/base -- datadir =/var must be specified during backup. /lib/mysql/author instancebitsCN.com

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.