Databases 4 min read

Understanding the apply‑log‑only Parameter in Percona XtraBackup Restores

This article explains how the apply‑log‑only option in Percona XtraBackup affects MySQL restoration, illustrates the risk of data inconsistency when the option is omitted, and provides guidance on correctly using the parameter during full and incremental backup recovery to ensure complete transaction replay.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Understanding the apply‑log‑only Parameter in Percona XtraBackup Restores

XtraBackup is widely used for MySQL backup and restoration, copying data files and associated redo logs to guarantee consistency.

The apply-log-only parameter controls whether the undo phase is executed during recovery; omitting it can cause incomplete transactions to be rolled back, leading to data loss.

During a full backup, uncommitted transactions may have only partial redo log entries copied, while incremental backups may contain the full transaction data. If apply-log-only is not set, the recovery process will apply undo on these partial entries, corrupting the restored dataset.

The correct practice is to enable apply-log-only for all backup restores except the final incremental backup, ensuring that only the redo log phase is replayed and the undo phase is skipped, resulting in a complete and consistent data state.

Reference: Percona XtraBackup apply‑log‑only option documentation .

DatabaseMySQLBackupxtrabackuprestoreapply-log-only
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.