标签:bst backup Xtraback user sql efault wget pass parallel
NC+ xtrabackup 备份到远程:
source:192.168.30.36
target 192.168.9.104
1:开启目标库nc 监听
target: nc -l 9999 | tee >(sha1sum > destination_checksum) > /data/backup/backup.xbstream
2:源库传备份,亲测不落地
source: xtrabackup --defaults-file=/data/db/mysql3366/my.cnf --user=root --password=‘XXX‘ --use-memory=8G --parallel=4 --backup --stream=xbstream --target-dir=./ | tee >(sha1sum > source_checksum)| nc 192.168.9.104 9999
3:解压
xbstream -x < backup.xbstream -C ./
4:恢复:
xtrabackup --defaults-file=/data/db/mysql3366/my.cnf --prepare --target-dir=/data/backup xtrabackup --defaults-file=/data/db/mysql3366/my.cnf --datadir=/data/db/mysql3366/data/ --copy-back --target-dir=/data/backup/
参考资料
官方网站example
wget https://www.percona.com/downloads/Percona-XtraBackup-LATEST/Percona-XtraBackup-8.0-7/binary/redhat/7/x86_64/percona-xtrabackup-80-8.0.7-1.el7.x86_64.rpm https://www.percona.com/doc/percona-xtrabackup/LATEST/howtos/recipes_xbk_stream.html
标签:bst backup Xtraback user sql efault wget pass parallel
原文地址:https://www.cnblogs.com/monkeybron/p/11711251.html