InnoDB Backup and Recovery¶
InnoDB Backup¶
Hot Backups¶
The mysqlbackup command, part of the MySQL Enterprise Backup component
Cold Backups¶
- Perform a slow shutdown of the MySQL server and make sure that it stops without errors.
- Copy all
InnoDB
data files (ibdata
files and.ibd
files) into a safe place. - Copy all the
.frm
files forInnoDB
tables to a safe place. - Copy all
InnoDB
log files (ib_logfile
files) to a safe place. - Copy your
my.cnf
configuration file or files to a safe place.
Logical Backups Using mysqldump¶
In addition to physical backups, it is recommended that you regularly create logical backups by dumping your tables using mysqldump.
Tips¶
backup-mysql.sh
mysql-backup.sh