一、软件:
MySql8.0.20
percona-xtrabackup-80-8.0.13-1.el7.x86_64
安装:
自已脑补
二、使用:
1.权限
CREATE USER 'xtrabk'@'127.0.0.1' IDENTIFIED BY 'Xtrabk#123';
GRANT BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'xtrabk'@'127.0.0.1';
GRANT SELECT ON performance_schema.log_status TO 'xtrabk'@'127.0.0.1';
FLUSH PRIVILEGES;
mysql_config_editor set --login-path=xtrlogin -uxtrabk -h127.0.0.1 -P3306 -pXtrabk#123
2.全备+增备
全备:
xtrabackup --login-path=xtrlogin --parallel=2 --stream=xbstream --extra-lsndir=/mysqlbackup/node2/checkpoint --tmpdir=/mysqlbackup/node2/tmp --backup --target-dir=/mysqlbackup/node2
增备:
xtrabackup --login-path=xtrlogin --parallel&#