centos7 xtrabackup mysql(8)增量备份(1)
参考
xtrabackup-8.0的安装、备份以及恢复(innoxtrabackup有待测试)
https://blog.youkuaiyun.com/DWJRIVER/article/details/117792271
https://blog.youkuaiyun.com/qq_28721869/article/details/118853884
在 master 192.168.99.40 上面做增量备份
1.2 Xtrabackup 系列版本
目前 Xtrabackup 活跃的大版本有三个:
Xtrabackup 2.4 适用于 MySQL 5.6 和 MySQL 5.7。
Xtrabackup 8.0 适用于 MySQL 8.0。
Xtrabackup 8.1 适用于 MySQL 8.1。
Xtrabackup与mysqldump区别
Xtrabackup属于物理备份,mysqldump属于逻辑备份。
Xtrabackup占用的CPU与内存较少,消耗的IO相对较大,备份后的文件较大。
通过mysql自带的工具mysqldump进行逻辑备份和恢复,虽然可以节省磁盘空间,但是速度很慢。
查看版本:
xtrabackup --version
https://www.percona.com/downloads
安装 方法
1
wget https://downloads.percona.com/downloads/Percona-XtraBackup-2.4/Percona-XtraBackup-2.4.26/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.26-1.el7.x86_64.rpm
2
sudo yum localinstall -y ./percona-xtrabackup-24-2.4.26-1.el7.x86_64.rpm
删除的方法:(暂时不用删除)
sudo yum remove percona-xtrabackup-24.x86_64
xtrabackup --version
xtrabackup: recognized server arguments: --datadir=/opt/datadir/mysql/ --server-id=40 --log_bin=mysql-bin
xtrabackup version 2.4.26 based on MySQL server 5.7.35 Linux (x86_64) (revision id: 19de43b)
mysql -u root -p
1234aA~1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.44-log MySQL Community Server (GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
my.cnf
# For advice on how to change settings please see
# http://