1. Install Tool Percona XtraBackup
- 5.6 and previous versions of MySQL need to install Percona XtraBackup 2.3, installation instructions, see the official documentation Percona XtraBackup 2.3 .
- MySQL 5.7 version needs to be installed Percona XtraBackup 2.4, installation instructions, see the official documentation Percona XtraBackup 2.4 .
- MySQL 8.0 version needs to be installed Percona XtraBackup 8.0, installation instructions, see the official documentation Percona XtraBackup 8.0 .
2. Install qpress
First install percona-release-0.1-4
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
yum update percona-release
yum install qpress
3. Unpack
For tar archive (.tar.gz suffix), use the command:
tar -izxvf <数据备份文件名>.tar.gz -C /home/mysql/data
For xbstream compressed (.xb.gz suffix), use the command:
gzip -d -c <数据备份文件名>.xb.gz | xbstream -x -v -C /home/mysql/data
For xbstream package (_qp.xb suffix), use the command:
## 解包
cat <数据备份文件名>_qp.xb | xbstream -x -v -C /home/mysql/data
## 解压
innobackupex --decompress --remove-original /home/mysql/data
Description -C: Specifies the files to be extracted to the directory. An optional parameter to specify if you extract to the current directory
At 4. mv / home / mysql / data / library folder to / var / lib / mysql (depending on the need to modify the database data path)
5 .systemctl restart mysqld # restart the database
problem:
1. The report does not exist
Processing Method: ibdata1 copy to add to the file at datadir
Reference Address: https://blog.csdn.net/ganggang4321/article/details/100879238 [installation] qpress
https://help.aliyun.com/knowledge_detail/41817.html?spm=5176.13394938.0.0.3ab47cffzhsz7V [Processing Data]
https://www.cnblogs.com/nsh123/p/11627462.html [of] the error report does not exist