Home >Database >Mysql Tutorial >mysql uses backup tool ibbackup for database backup

mysql uses backup tool ibbackup for database backup

黄舟
黄舟Original
2016-12-14 15:20:112366browse

Use the backup tool ibbackup:
ibbackup is a hot backup tool of the innodb company (www.innodb.com), which specializes in physical hot backup of the innodb storage engine. This tool is charged and cannot be used for free. Now innodb company has been acquired by oracle. How to use:
Edit the configuration file my.cnf for startup and the configuration file my2.cnf for backup. The example of my.cnf is as follows:
[mysqld]
datadir = /home/heikki /data
innodb_data_home_dir = /home/heikki/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/heikki/data
set-variable = innodb_log_files_in_group=2
set-variable = innodb_log_file_size =20M
If you want to backup to / home/heikki/backup, then the example of my2.cnf is as follows:
[mysqld]
datadir = /home/heikki/backup
innodb_data_home_dir = /home/heikki/backup
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /home/ heikki/backup
set-variable = innodb_log_files_in_group=2
set-variable = innodb_log_file_size=20M
Start backup
ibbackup my.cnf my2.cnf
If recovery is needed, log redo
ibbackup --apply-log my2.cnf
Restart the database service after recovery

If you want to get more related articles, please pay attention to the php Chinese website (www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn