For an overview of incremental backups and usage examples for these options, see Section 4.3.3, “Making a Differential or Incremental Backup”.
To take an incremental backup, specify the
along with the
--incremental-backup-dir option. All
InnoDB data modified after the specified
LSN is copied in the incremental
backup. Depending on whether
--incremental-with-redo-log-only is used, other
options are required or recommended.
Specifies that the associated
backup-to-imageoperation is incremental. Also requires either the
--incremental-baseoption, or the combination of the
Only InnoDB tables are backed up incrementally. By default, all non-InnoDB and
.frmfiles are included into the incremental backup and in their fullness. To exclude non-InnoDB data in an incremental backup, use the
Specifies that an incremental backup is to be created using only the redo log. This alternate type of incremental backup has different performance characteristics and operational limitations comparing to backups created with the
--incrementaloption; see Creating Incremental Backups Using Only the Redo Log for a discussion on their differences.
To use this option, you also need to specify the
--incremental-baseoption, or a combination of the
--incremental-backup-diroptions. Just like with the
--incrementaloption, only InnoDB tables are backed up incrementally. By default, all non-InnoDB and
.frmfiles are included in incremental backup and in their fullness. To exclude non-InnoDB data in an incremental backup, use the
With this option, the mysqlbackup retrieves the information needed to perform incremental backups from the metadata inside the backup directory rather than from the
--start-lsnoption. It saves you from having to specify an ever-changing, unpredictable LSN value when doing a succession of incremental backups. Instead, you specify a way to locate the previous backup directory through the combination of
argumentin the option syntax. The alternatives are:
You specify the prefix
dir:followed by a directory path. The path argument points to the directory where the data from the previous backup is stored. With the first incremental backup, you specify the directory holding the full backup; with the second incremental backup, you specify the directory holding the first incremental backup, and so on.
You specify the prefix
last_backup, the only valid argument for this mode. This makes mysqlbackup query the
end_lsnvalue from the last successful non-TTS backup as recorded in the
backup_historytable of the server instance that is being backed up.NoteWarning
Do not use the
history:mode if the previous backup was a full backup taken with the
--no-connectionoption, which always turns off the recording of backup history and might cause errors for a subsequent incremental backup using this mode of the
In an incremental backup, specifies the highest LSN value included in a previous backup. You can get this value from the output of the previous backup operation, or from the
end_lsncolumn for the previous backup operation. Always used in combination with the
--incrementaloption; not needed when you use the
--incremental-baseoption; not recommended when you use the
--incremental-with-redo-log-onlymechanism for incremental backups.Note
No binary log files are copied into the incremental backup if the
--start-lsnoption is used. To include binary log files for the period covered by the incremental backup, instead of
--start-lsn, use the
--incremental-baseoption, which provides the necessary information for mysqlbackup to ensure that no gap exists between binary log data included in the previous backup and the current incremental backup.
Specifies the location for data of an incremental backup. When creating or restoring an incremental backup, the option serves the same function as
--backup-dirdoes for backups and restores in general, and the option can in fact be used interchangeably with
--backup-dir. See the description for
The location specified by
--incremental-backup-diris the same location you will specify with
--incremental-basewhen you use that option in the
dir:mode for a subsequent incremental backup.