Percona xtrabackup 2.3.2 MySQL5.6 Backup Recovery

Source: Internet
Author: User
Tags change settings percona

    1. RPM Way to install MySQL 5.6

mysql-server-5.6.27-1.el6.x86_64.rpm

mysql-client-5.6.27-1.el6.x86_64.rpm

MYSQL-SHARED-COMPAT-5.6.27-1.EL6.X86_64.RPM (Perl-dbd-mysql require)


2.my.cnf


[Email protected] lib]# VI/ETC/MY.CNF

# for advice The change settings

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html


[Mysqld]

DataDir =/var/lib/mysql

Log_bin =/var/lib/mysql/bin-log

Socket =/var/lib/mysql/mysql.sock

Sql_mode=no_engine_substitution,strict_trans_tables


3.source Install Percona xtrabackup 2.3.2


Second, test backup recovery

Backup Type Check

# more Xtrabackup_checkpoints

Backup_type = full-backuped (full backup)

FROM_LSN = 0

TO_LSN = 1678899

LAST_LSN = 1678899

Compact = 0

Recover_binlog_info = 0


    1. Full backup Test

Does not generate a timestamp mode Notimestamp

Full backup

Innobackupex--defaults-file=/etc/my.cnf--user=root--password=123456--no-timestamp/data/mysql_backup/full

Recovery

Innobackupex--apply-log/data/mysql_backup/full--user=root--password=123456

Innobackupex--defaults-file=/etc/my.cnf--copy-back/data/mysql_backup/full


Directory Permissions Operations

# chown Mysql.mysql-r MySQL

Start the MySQL server

#/etc/init.d/mysql Start

Starting MySQL ....... ................. [OK]



2. Full-volume + incremental test


Does not generate a timestamp mode Notimestamp

1) Backup operation

Full backup (MySQL server running status)

Innobackupex--defaults-file=/etc/my.cnf--user=root--password=123456--no-timestamp/data/mysql_backup/ Full (fully backup directory)


First incremental backup (MySQL server running status)

# Innobackupex--INCREMENTAL/DATA/MYSQL_BACKUP/INC01--incremental-basedir=/data/mysql_backup/full (full backup directory)-- No-timestamp--user=root--password=123456--defaults-file=/etc/my.cnf


Second incremental backup (MySQL server running status)


# Innobackupex--INCREMENTAL/DATA/MYSQL_BACKUP/INC02--incremental-basedir=/data/mysql_backup/inc01 (First incremental catalog)-- No-timestamp--user=root--password=123456--defaults-file=/etc/my.cnf


2) Recovery steps

(MySQL server may not be running state)

Innobackupex--apply-log--redo-only/data/mysql_backup/full (full backup directory)--user=root--password=123456

Innobackupex--apply-log--redo-only/data/mysql_backup/full (full backup directory)--incremental-dir=/data/mysql_backup/ INC01 (First incremental catalog)--user=root--password=123456

Innobackupex--apply-log--redo-only/data/mysql_backup/full (full backup directory)--incremental-dir=/data/mysql_backup/ INC02 (Second incremental directory)--user=root--password=123456


Innobackupex--apply-log/data/mysql_backup/full (full backup directory)--user=root--password=123456

Innobackupex--defaults-file=/etc/my.cnf--copy-back/data/mysql_backup/full (full backup directory)


Directory Permissions Operations

# chown Mysql.mysql-r MySQL


Start the MySQL server

#/etc/init.d/mysql Start

Starting MySQL ....... ................. [OK]

This article is from the "Yiyi" blog, make sure to keep this source http://heyiyi.blog.51cto.com/205455/1713111

Percona xtrabackup 2.3.2 MySQL5.6 Backup Recovery

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.