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
InnoDBdata files (ibdatafiles and.ibdfiles) into a safe place.Copy all the
.frmfiles forInnoDBtables to a safe place.Copy all
InnoDBlog files (ib_logfilefiles) to a safe place.Copy your
my.cnfconfiguration 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.shmysql-backup.sh
InnoDB Recovery#
Point-in-Time Recovery#
Recovery from Data Corruption or Disk Failure#
InnoDB Crash Recovery#
The InnoDB crash recovery process consists of several steps:
Redo log application
Roll back of incomplete transactions
Change buffer merge
Purge