Making a Full Backup¶
Backup the InnoDB data and log files - located in
/data/backups/mysql/(destination). Then, prepare the backup files to be ready to restore or use (make the data files consistent).
Make a backup:¶
xtrabackup --backup --target-dir=/data/backups/mysql/
Prepare the backup twice:¶
xtrabackup --prepare --target-dir=/data/backups/mysql/ xtrabackup --prepare --target-dir=/data/backups/mysql/
- The exit status of xtrabackup is 0.
- In the second
--preparestep, you should see InnoDB print messages similar to
Log file ./ib_logfile0 did not exist: new to be created, followed by a line indicating the log file was created (creating new logs is the purpose of the second preparation).