In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Xtrabackup is a mysql database backup tool provided by percona. According to officials, it is the only open source tool in the world that can provide hot backup for innodb and xtradb databases.
Brief introduction
Xtrabackup is a mysql database backup tool provided by percona. According to officials, it is the only open source tool in the world that can provide hot backup for innodb and xtradb databases. Features:
(1) the backup process is fast and reliable
(2) the backup process will not interrupt the transaction in progress.
(3) it can save disk space and traffic based on compression and other functions.
(4) automatic backup verification
(5) Fast reduction speed.
There are two tools in Xtrabackup:
* xtrabackup-A tool for hot backup of innodb and xtradb tables. Other tables cannot be backed up.
* innobackupex-A perl script encapsulated in xtrabackup that provides the ability to back up MyISAM tables. (can back up the whole database and data table).
When using innobakupex backup, it calls xtrabackup to back up all InnoDB tables and copies all related files (.frm) about the table structure definition, as well as MyISAM, MERGE, CSV and ARCHIVE tables
Files related to triggers and database configuration information are also backed up. These files are saved to a directory with time commands.
While backing up, innobackupex also creates the following files in the backup directory:
(1) xtrabackup_checkpoints-backup type (such as full or incremental), backup status (if it is already prepared status), and LSN (log serial number) range information; each InnoDB page (usually 16k size) contains a log serial number, that is, LSN. LSN is the system version number of the entire database system, and the LSN associated with each page can indicate how the page has changed recently.
(2) xtrabackup_binlog_info-the location of the binary log files currently in use by the mysql server and the binary log events up to the moment of backup.
(3) xtrabackup_binlog_pos_innodb-the current position of the binary log file and the binary log file used for the InnoDB or XtraDB table.
(4) xtrabackup_binary-the executable file of xtrabackup used in backup
(5) backup-my.cnf-configuration option information used for backup commands
When using innobackupex for backup, you can also use the-- no-timestamp option to prevent the command from automatically creating a directory named by time; the innobackupex command will create a BACKUP-DIR directory to store backup data.
Binary version
Http://www.percona.com/downloads/XtraBackup/
Wget http://www.percona.com/downloads... Up-2.0.3-470.tar.gz
Tar zxvf percona-xtrabackup-2.0.3-470.tar.gz
Cd percona-xtrabackup-2.0.3/bin
Cp * / usr/bin/
This time, mysql5.5.28 is installed and not described here.
Create a directory for data backup
Mkdir-p / opt/mysql_bak/
Modify the database configuration file:
Vim / etc/my.cnf
Datadir = / home/mysql/data/
Mysqladmin-uroot password 123456
Full library backup:
Innobackupex-user=root-password=123456-defaults-file=/etc/my.cnf / opt/mysql_bak/
Separate backup:
Innobackupex-user=root-password=123456-defaults-file=/etc/my.cnf-database=test / opt/mysql_bak
Back up and package compression:
Innobackupex-user=root-password=123456-defaults-file=/etc/my.cnf-database=test-stream=tar / opt/mysql_bak/ | gzip > / opt/mysql_bak/testdb.tar.gz
With time stamp
Innobackupex-- user=root-- password=123456-- defaults-file=/etc/my.cnf-- database=test-- stream=tar / opt/mysql_bak/ | gzip > / opt/mysql_bak/ `date +% F` _ testdb.tar.gz
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.