mysql Percona-XtraBackup
阿新 • • 發佈:2018-09-04
user ack mov 適合 ron down get wget Xtraback
下載(示例:centos7下2.4.4版本,用https://www.percona.com/downloads/XtraBackup/LATEST/選擇適合版本)
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.4/ binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm
安裝
yum localinstall percona-xtrabackup-24-2.4.4-1.el7.x86_64.rpm
卸載
yum remove percona-xtrabackup
備份
innobackupex --defaults-file=/etc/my.cnf --user=root --password=‘p4ssword‘ --stream=tar --databases="database_name" /opt/backup/ | gzip > /opt/backup/`date +%Y%m%d`.tar.gz
還原,還原前需要先停掉mysql服務
innobackupex --copy-back /path/to/BACKUP-DIR
mysql Percona-XtraBackup