Buy Percona ServicesBuy Now!

Making a Full Backup

Backup the InnoDB data and log files - located in /var/lib/mysql/ - to /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/

Success Criterion

  • The exit status of xtrabackup is 0.
  • In the second --prepare step, 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).


  • You might want to set the --use-memory option to something similar to the size of your buffer pool, if you are on a dedicated server that has enough free memory. More details here.
  • A more detailed explanation is here
This documentation is developed in Launchpad as part of the Percona XtraBackup 2.1.
If you spotted inaccuracies, errors, don't understand it or you think something is missing or should be improved, please file a bug.
Visit Percona Store

General Inquiries

For general inquiries, please send us your question and someone will contact you.