Documentation Home
MySQL Enterprise Backup 8.4 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


19.2 Update Operations

There are two types of operations to bring your backup data up-to-date:

Apply-log Operation

After a backup job was first completed, the backup data might not be in a consistent state, because data could have been inserted, updated, or deleted while the backup was running. This initial backup file is known as theraw backup. During a backup,mysqlbackup also copies the accumulated InnoDB log to a file calledibbackup_logfile. In an apply-log operation, theibbackup_logfile file is used toroll forward the raw data files, so that every page in the data files corresponds to the same log sequence number of the InnoDB log. This is similar to the operation that takes place during acrash recovery.

For single-file backups, the apply-log operation is usually performed as part of thecopy-back-and-apply-log command. For directory backups, thecopy-back-and-apply-log command can also be used, but you also have the two alternatives of

  • Performing the apply-log operation together with the back up using thebackup-and-apply-log command (not applicable for incremental or compressed directory backups)

  • Performing the apply-log operation separately with theapply-log command on the raw backup, before running thecopy-back command.

mysqlbackup [STD-OPTIONS]            [--limit-memory=MB] [--uncompress] [--backup-dir=PATH]            [MESSAGE-LOGGING-OPTIONS]            [PROGRESS-REPORT-OPTIONS]            [ENCRYPTED-INNODB-OPTIONS]            apply-log

apply-log

Advanced: Brings the InnoDB tables in the directory backup up-to-date, including any changes made to the data while the backup was running.

Example 19.1 Apply Log to Full Backup

mysqlbackup --backup-dir=/path/to/backup apply-log

It reads thebackup-my.cnf file insidebackup-dir to understand the backup. Themy.cnf defaults files have no effect other than supplying thelimit-memory=MB value, which limits usage of memory while doing theapply-log operation.


Apply-incremental-backup Operation

Advanced: Use theapply-incremental-backup to update a backup directory with data in an incremental backup directory:

mysqlbackup [STD-OPTIONS]            [--incremental-backup-dir=PATH] [--backup-dir=PATH]            [--limit-memory=MB] [--uncompress]            [MESSAGE-LOGGING-OPTIONS]            [PROGRESS-REPORT-OPTIONS]            [ENCRYPTED-INNODB-OPTIONS]            apply-incremental-backup

apply-incremental-backup

Advanced: Brings up-to-date a directory backup specified with the--backup-dir option, using the data from an incremental backup directory specified with the--incremental-backup-dir option. SeeSection 5.1.3, “Restoring an Incremental Backup” for instructions on restoring incremental backups.

For a single-file incremental backup, you typically use thecopy-back-and-apply-log command to apply the data in the incremental image backup to the full backup that has already been restored to the data directory of the target server.