In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "XtraBackup backup and restore MySQL database process". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Download XtraBackup:
# wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.6/binary/tarball/percona-xtrabackup-2.4.6-Linux-x86_64.tar.gz
Decompression software:
# tar xvf percona-xtrabackup-2.4.6-Linux-x86_64.tar.gz -C /usr/local/
# cd /usr/local/
# mv percona-xtrabackup-2.4.6-Linux-x86_64/ xtrabackup
Setting environment variables:
# echo "export PATH=/usr/local/xtrabackup/bin:\$PATH">>/etc/profile
# source /etc/profile
Install dependency packages:
yum install -y perl-Digest-MD5
Full database:
[mysql@publicserver ~]$ innobackupex --defaults-file=/etc/my.cnf --user=root --password=centos --socket=/var/lib/mysql/mysql.sock /mysqlbk
Incremental backup database:
[mysql@publicserver ~]$ innobackupex --defaults-file=/etc/my.cnf --user=root --password=centos --socket=/var/lib/mysql/mysql.sock --incremental --incremental-basedir=/mysqlbk/2017-03-26_21-56-46 /mysqlbk_rec
Fully prepared for recovery:
[mysql@publicserver ~]$ innobackupex --defautls-file=/mysqlbk/my.cnf --apply-log --redo-only /mysqlbk/2017-03-26_21-56-46
Incremental Recovery Preparation:
[mysql@publicserver ~]$ innobackupex --defaults-fil=/mysqlbk/my.cnf --apply-log /mysqlbk/2017-03-26_21-56-46 --incremental-dir=/mysqlbk_rec/2017-03-26_21-57-11
Execute innobackupex --apply-log:
[mysql@publicserver ~]$ innobackupex --defautls-file=/mysqlbk/my.cnf --apply-log /mysqlbk/2017-03-26_21-56-46
Perform Recovery:
[mysql@publicserver ~]$ innobackupex --defaults-file=/mysqlbk/my.cnf --socket=/var/lib/mysql/mysql.sock --copy-back /mysqlbk/2017-03-26_21-56-46
Compress backup set:
[mysql@publicserver ~]$ innobackupex --defaults-file=/usr/local/mysql/my.cnf --user=root --password=centos --socket=/tmp/mysql.sock --stream=tar /tmp | gzip ->/mysqlbk/mysql_fullbackup.tar.gz
"XtraBackup backup restore MySQL database process" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.