1,在备份InnoDB的过程中,记录的变更保存于xtrabackup_logfile文件,所以在准备(运用原木)的时候,需要重放该部分数据到表空间。
2,如果库中只使用了InnoDB或者XtraDB引擎,恢复的时候使用xtrabackup_binlog_pos_innodb文件确定pos信息;
3,如果还有其他引擎(如MyISAM)恢复的时候使用xtrabackup_binlog_info确定pos信息;
4, innobackupex的过程图示
[root@zabbix-server 2017 - 05 - 22 - _07 - 24 - 07] #, innobackupex ——defaults-file=' '/etc/my . cnf中所做,——用户=root ——密码=zhagyilig@mysql ——用户内存=2048 m ,——no-timetamp ——backup /opt/
[root@zabbix-server 选择]# innobackupex ,——defaults-file=' '/etc/my . cnf中所做,——apply-log , 2017 - 05 - 26 - _15 - 53 - 59/
2。将备份进行压缩,拷贝到奴隶
tar -czvf 2017 - 05 - 26 - _15 - 53 - 59 - mysql.tar.gz 2017 - 05 - 26 - _15 - 53 - 59/,, scp mysql_full_backup.tar.gz  xxx@xxx:/道路/
3。在主创建复制用户
grant replication slave 提醒*。*,用“代表”@“192.168.21. %”,identified by “复制”,,,, flush 特权;
4。配置奴隶
<>之前(root@beiyong-server 数据)#,cat xtrabackup_binlog_info mysql-bin。000006 216752542 , stop 奴隶; CHANGE MASTER 用, MASTER_HOST=?92.168.21.161’,, MASTER_PORT=3306, MASTER_USER=怼?, MASTER_PASSWORD=粗啤?, MASTER_LOG_FILE=' mysql-bin.000006 ', MASTER_LOG_POS=216752542;, start 奴隶; show slave 地位\ G * * * * * * * * * * * * * * * * * * * * * * * * * * *,1只row * * * * * * * * * * * * * * * * * * * * * * * * * * * ,,,,,,,,,,Slave_IO_State:, Waiting for master 用send 事件 ,,,,,,,,,,,,,Master_Host: 192.168.21.161 ,,,,,,,,,,,,,Master_User:代表 ,,,,,,,,,,,,,Master_Port: 3306 ,,,,,,,,,,,Connect_Retry: 60 ,,,,,,,,,Master_Log_File: mysql-bin.000006 ,,,,,Read_Master_Log_Pos: 216816993 ,,,,,,,,,,Relay_Log_File: beiyong-server-relay-bin.000002 ,,,,,,,,,,,Relay_Log_Pos: 64734 ,,,Relay_Master_Log_File: mysql-bin.000006 ,,,,,,,,Slave_IO_Running:是的 ,,,,,,,Slave_SQL_Running:是的 ,....//利用innobackupex搭MySQL从建库,结束。