Xtrabackup是一个对InnoDB做数据备份的工具,支持在线热备份(备份时不影响数据读写),是商业备份工具InnoDB Hotbackup的一个很好的替代品。
Xtrabackup有两个主要的工具:xtrabackup、innobackupex
(1)xtrabackup只能备份InnoDB和XtraDB两种数据表,而不能备份MyISAM数据表
(2)innobackupex-1.5.1则封装了xtrabackup,是一个脚本封装,所以能同时备份处理innodb和myisam,但在处理myisam时需要加一个读锁

./innobackupex --defaults-file=/etc/my.cnf --user=root --password=123 --socket=/tmp/mysql.sock3 /tmp/
还不支持5.7吗
-
[root@MyO bin]# ./innobackupex --defaults-file=/etc/my.cnf --user=root --password=123 --socket=/tmp/mysql.sock /tmp/
-
151230 10:01:39 innobackupex: Starting the backup operation
-
-
IMPORTANT: Please check that the backup run completes successfully.
-
At the end of a successful backup run innobackupex
-
prints "completed OK!".
-
-
151230 10:01:39 version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;port=3300;mysql_socket=/tmp/mysql.sock‘ as ‘root‘ (using password: YES).
-
151230 10:01:39 version_check Connected to MySQL server
-
151230 10:01:39 version_check Executing a version check against the server...
-
151230 10:01:39 version_check Done.
-
151230 10:01:39 Connecting to MySQL server host: localhost, user: root, password: set, port: 3300, socket: /tmp/mysql.sock
-
Error: Unsupported server version: ‘5.7.9-log‘. Please report a bug at https://bugs.launchpad.net/percona-xtrabackup
-
-
[root@MyO bin]# ./innobackupex --defaults-file=/etc/my.cnf --user=root --password=123 --socket=/tmp/mysql.sock3 /backup/
151230 10:07:33 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
151230 10:07:34 version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;port=3300;mysql_socket=/tmp/mysql.sock3‘ as ‘root‘ (using password: YES).
151230 10:07:34 version_check Connected to MySQL server
151230 10:07:34 version_check Executing a version check against the server...
151230 10:07:34 version_check Done.
151230 10:07:34 Connecting to MySQL server host: localhost, user: root, password: set, port: 3300, socket: /tmp/mysql.sock3
Using server version 5.6.27-log
Error: option ‘datadir‘ has different values:
‘/data/mysql_data‘ in defaults file
‘/data3/‘ in SHOW VARIABLES
-
innodb存储引擎备份工具--Xtrabackup
原文:http://blog.itpub.net/29990276/viewspace-1970692/