In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Xtrabackup installation
Https://www.percona.com/downloads/XtraBackup/LATEST/
Download the appropriate version package
Wget ftp://rpmfind.net/linux/atrpms/el6-x86_64/atrpms/stable/libev-4.04-2.el6.x86_64.rpm
Full database backup
[root@bogon] # innobackupex-- defaults-file=/home/mysql/mysql_5535/etc/my.cnf-- user=root-- password=123456 / backup/
This statement copies the data file (specified by the variable datadir in my.cnf) to the backup directory (/ backup/mysql/data). Note: if you do not specify-- defaults-file, the default value is / etc/my.cnf.
After the backup is successful, a timestamp directory will be created under the backup directory
[root@bogon ~] # cd / backup/
[root@bogon backup] # ls
2016-12-07 14-27-04 2016-12-07 17-33-09
[root@bogon backup] #
Restore:
Before restoring, close the database and delete the data files and log files.
Innobackupex-defaults-file=/home/mysql/mysql_5535/etc/my.cnf-user=root-password=123456-use-memory=500m-apply-log / backup/2016-12-07 July 17-33-09 /
Innobackupex-defaults-file=/home/mysql/mysql_5535/etc/my.cnf-user=root-password=123456-copy-back / backup/2016-12-07 / 17-33-09 /
From what can be seen, recovery is divided into two steps, the first step is apply-log, in order to speed up, it is generally recommended to set-- use-memory, after this step is completed, the backup files under the directory / backup are ready.
The second step is copy-back, which copies the backup files to the original data directory.
After the restore is complete, be sure to check that the owner and permissions of the data directory are correct.
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.