【mysql使用系列】percona-xtrabackup 8.0安装和初步使用

参考

参考资料

https://blog.csdn.net/wfs1994/article/details/80396604

官方文档

https://www.percona.com/doc/percona-xtrabackup/8.0/index.html
https://www.percona.com/doc/percona-xtrabackup/8.0/installation.html#installing-percona-xtrabackup-from-repositories
https://www.percona.com/doc/percona-xtrabackup/8.0/installation/yum_repo.html
https://www.percona.com/doc/percona-xtrabackup/8.0/using_xtrabackup/privileges.html
https://www.percona.com/doc/percona-xtrabackup/8.0/backup_scenarios/full_backup.html

xtrabackup简介与安装

xtrabackup简介

安装

wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-8.0.4/binary/redhat/7/x86_64/percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm
yum localinstall percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm

授权和备份操作

授权操作

CREATE USER 'backupuser'@'%' IDENTIFIED with mysql_native_password BY '123456';
GRANT BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'backupuser'@'%';
GRANT SELECT ON performance_schema.log_status TO 'backupuser'@'%';
FLUSH PRIVILEGES;

备份操作

xtrabackup --host=192.168.128.54 --port=3306 --user=backupuser --password=123456 --backup --target-dir=/data/backup/percona8.0

查看备份结果

适用场景

percona xtrabackup 8.0适合mysql/percona 8.0版本,如果是mysql 5.6/5.7版本,请参考官方的xtrabackup 2.4版本。

未完待续。