环境:
Ubuntu 12.04.5 LTS
mysql 5.5.47
备份路径 /backup/
安装
apt-get install percona-xtrabackup
一、 全量备份
root@iZu1dc59z8tZ:/var/lib# innobackupex --defaults-file=/etc/mysql/my.cnf --user=root --password=123123 /backup/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/ubuntu
160217 11:17:53 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/mysql/my.cnf;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
160217 11:17:53 innobackupex: Connected to MySQL server
160217 11:17:53 innobackupex: Executing a version check against the server...
160217 11:17:53 innobackupex: Done.
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql server version 5.5.47-0ubuntu0.14.04.1
innobackupex: Created backup directory /backup/2016-02-17_11-17-53
160217 11:17:53 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="/etc/mysql/my.cnf" --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/backup/2016-02-17_11-17-53 --tmpdir=/tmp
innobackupex: Waiting for ibbackup (pid=30486) to suspend
innobackupex: Suspend file '/backup/2016-02-17_11-17-53/xtrabackup_suspended_2'
xtrabackup_55 version 2.1.8 for Percona Server 5.5.35 Linux (x86_64) (revision id: undefined)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
>> log scanned up to (3233814)
[01] Copying ./ibdata1 to /backup/2016-02-