MySQL Enterprise Backup: Backup Lock, Redo Log Archiving, and Page Tracking Features
This article explains the importance of database backup and details MySQL Enterprise Backup (MEB) features—Backup Lock, Redo Log Archiving, and Page Tracking—along with usage commands, performance considerations, and comparisons to xtrabackup for MySQL 8.0 environments.
Data backup is the final line of defense for disaster recovery; even with multi‑site architectures, reliable backup tools are essential to avoid business‑impacting failures.
MySQL Enterprise Backup (MEB) is the primary backup solution bundled with MySQL Enterprise Edition, while the open‑source counterpart xtrabackup serves as a fallback but lacks support for several new MySQL 8.0 features.
Since MySQL 8.0, new capabilities such as Backup Lock, Redo Log Archiving, and Page Tracking enhance backup and restore experiences, which xtrabackup does not yet implement.
Feature 1: Backup Lock – Prior to MySQL 8.0, physical backups required a global read lock, making the instance read‑only and potentially blocking writes for minutes on large schemas. MEB uses the lightweight LOCK INSTANCE FOR BACKUP lock, allowing DML operations to continue while preventing DDL. Example: a 12,000‑table instance locked for over ten minutes with xtrabackup, whereas MEB avoided the lock.
Only InnoDB tables: use backup lock.
Feature 2: Redo Log Archiving – MEB can perform hot backups without locking by continuously reading InnoDB redo logs and writing changes to ibbackup_logfile . Heavy write loads can outpace this process, causing backup failures. MEB 4.1 introduced multithreaded redo‑log handling, but the fundamental speed gap remained until MySQL 8.0.17, which adds native redo‑log archiving via innodb_redo_log_archive_dirs . When enabled, MEB automatically archives redo logs during checkpoints, preventing log overwrite loss.
Note: innodb_redo_log_archive_dirs must reside outside the data directory and have permissions set to 700.
Feature 3: Page Tracking – Page Tracking optimizes incremental backups by copying only pages modified since the last backup. Three scan modes exist:
page‑track : uses LSN to copy only changed pages (fastest).
optimistic : scans InnoDB files for modifications based on system time (limited).
full‑scan : scans all pages, copying any changed since the last backup (slowest).
To use page‑track, install the backup component and enable tracking before the full backup:
mysql> INSTALL COMPONENT "file://component_mysqlbackup"; SELECT mysqlbackup_page_track_set(true);Then run an incremental backup specifying the mode:
mysqlbackup --incremental-backup-dir=backup_incr --trace=3 --incremental=page-track --incremental-base=history:last_full_backup backupThe --incremental-base option supports three sources: last_backup , last_full_backup , and dir .
Performance tests show that when changed pages are less than 50% of total, page‑track mode can achieve at least a 2× speed improvement over full‑scan mode.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.