1. Create backup-related users
Create User 'Backuper'@'127.0.0.1'Identified by '123456';GrantReload,lock tables,ReplicationClient,process,super on *.* to 'Backuper'@'127.0.0.1';Grant Create,Insert,Select onPercona_schema.xtrabackup_history to 'Backuper'@'127.0.0.1';Create User 'Backuper'@'localhost'Identified by '123456';GrantReload,lock tables,ReplicationClient,process,super on *.* to 'Backuper'@'localhost';Grant Create,Insert,Select onPercona_schema.xtrabackup_history to 'Backuper'@'localhost';
2. Create a fully prepared
-- user=backuper--password=123456--host=127.0.0.1--port=3306/tmp/backup/
3. Create an Add-on
-- user=backuper--password=123456--host=127.0.0.1--port=3306--incremental--incremental-basedir=/tmp/backup/ 2016-09-07_04-14-17/tmp/backup_incremental
4. Forward roll log in full standby
--
5. Forward roll & Rollback log on standby
--
6. Copy the consistent backup to the DataDir directory
--
7, the owner of the adjustment data, belong to the group & start MySQL Service
- /usr/local/mysql/dataservice mysqld start
8. Back up the database in a single-file way
-- user=backuper--password=123456--host=127.0.0.1--port=3306--stream=xbstream/tmp >/tmp/backup/mysql_3306_ Full.xbstream
9. Unpacking the single file into a folder
- < /tmp/backup/-/tmp/DataDir
10, Roll forward & rollback log
-- Apply-log--use-memory=2g/tmp/datadir
11. Copy the consistent backup to the DataDir directory
-- defaults-file=/etc/my.cnf--copy-back/tmp/datadir
Innobackupex Instructions for use