king02 仅安装mysql 5.6软件无需建库 请参考《MYSQL 5.6源码编译安装实录》
king02 安装xtrabackup,请参考《MYSQL 5.6备份实录-- Percona XtraBackup》
[[email protected] ~]# mkdir -p /usr/local/mysql/backup
[[email protected] ~]# chown -R mysql /usr/local/mysql/backup
[[email protected] ~]# scp /etc/my.cnf [email protected]:/etc
[[email protected] ~]# su - mysql
[[email protected] ~]$ cd /usr/local/mysql/backup/
[[email protected] backup]$ scp -r 2018-02-04_03-00-01 [email protected]:/usr/local/mysql/backup
[[email protected] backup]$ scp -r 2018-02-05_03-00-01 [email protected]:/usr/local/mysql/backup
[[email protected] ~]# su - mysql
[[email protected] ~]$ innobackupex --defaults-file=/etc/my.cnf --apply-log --redo-only /usr/local/mysql/backup/2018-02-04_03-00-01/
[[email protected] ~]$ innobackupex --defaults-file=/etc/my.cnf --apply-log /usr/local/mysql/backup/2018-02-04_03-00-01/ --incremental-dir=/usr/local/mysql/backup/2018-02-05_03-00-01
[[email protected] ~]$ innobackupex --defaults-file=/etc/my.cnf --copy-back /usr/local/mysql/backup/2018-02-04_03-00-01/
[[email protected] ~]$ service mysqld start
Starting MySQL.. [ OK ]
[[email protected] ~]$ service mysqld status
MySQL running (15608)
原文地址:http://blog.51cto.com/13598811/2070226