xtrabackup8 install and use

---------- centos 7 --------------------------- installation xtrabackup8.0.4
1. Download
# 8.0
$ 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


2. Installation
yum localinstall percona-xtrabackup-80-8.0.4-1.el7.x86_64.rpm
unload command is as follows:
yum Remove Percona-xtrabackup

3. Backup
rpm installation default installation path is: / usr / bin / xtrabackup
/ usr / bin / xtrabackup = --defaults-File / opt / MHA / mysql8 / the conf / localhost the my.cnf --host = - user = root --password = mysql --port = 13306 --socket = / opt / mha / mysql8 / mysql.sock --backup --target-dir = / opt / mha / xbackup /


------------- remote recovery ----------------------
1. Copy the backup file to the destination machine
[root @ localhost MHA] # tar -cvf xbackup.tar ./xbackup/
[root @ localhost MHA] # scp xbackup.tar [email protected]: / opt / MHA /

2. Extract to the specified directory
[root @ localhost bin] # mkdir -p / opt / MHA / xbackup /
[root @ localhost xbackup] # tar -xvf xbackup.tar

3. stopped the need to restore the database
/ opt / mha / mysql8 / bin / mysqladmin -h 127.0.0.1 -uroot -P13306 -S /opt/mha/mysql8/mysql.sock shutdown


4. Before the backup data file directory, and create an empty directory
[root @ localhost mysql8] # cd / opt / MHA / mysql8
[root @ host02 mysql5718] # mv the Data bakdata
[root @ host02 mysql5718] # mkdir the Data

6.准备
xtrabackup --host=localhost --user=root --password=mysql --port=13306 --prepare --target-dir=/opt/mha/xbackup/xbackup/
xtrabackup --defaults-file=/opt/mha/mysql8/conf/my.cnf --user=root --prepare --target-dir=/opt/mha/xbackup/xbackup/


7.拷回数据:
xtrabackup --defaults-file=/opt/mha/mysql8/conf/my.cnf --user=root --copy-back --target-dir=/opt/mha/xbackup/xbackup/

8. Change the directory properties to start the database:

-----------------------------
问题1:遇到的问题:
Populating InnoDB table cache.
Allocated tablespace ID 1 for sys/sys_config, old maximum was 0
xtrabackup: Unknown error 3613
xtrabackup: Unknown error 3613
xtrabackup: Unknown error 3613

Guess you like

Origin www.cnblogs.com/hxlasky/p/11573789.html