Home >Database >Mysql Tutorial >mysql uses backup tool ibbackup for database backup
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