Documentation Home
MySQL Enterprise Backup 4.0 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb
EPUB - 233.0Kb
HTML Download (TGZ) - 180.5Kb
HTML Download (Zip) - 211.8Kb

15.7 Incremental Backup Options

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 --incremental or --incremental-with-redo-log-only, 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 or --incremental-with-redo-log-only is used, other options are required or recommended.

  • --incremental-with-redo-log-only

    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 --incremental option; 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-base option, or a combination of the --start-lsn and --incremental-backup-dir options. Just like with the --incremental option, only InnoDB tables are backed up incrementally. By default, all non-InnoDB and .frm files are included in incremental backup and in their fullness. To exclude non-InnoDB data in an incremental backup, use the --only-innodb option.

  • --incremental-base=mode:argument

    Command-Line Format--incremental-base=mode:argument
    Permitted ValuesTypestring

    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-lsn option. 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 mode and argument in the option syntax. The alternatives are:

    • dir:directory_path

      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.

    • history:last_backup

      You specify the prefix history: followed by last_backup, the only valid argument for this mode. This makes mysqlbackup query the end_lsn value from the last successful non-TTS backup as recorded in the backup_history table of the server instance that is being backed up.


      If the last full or partial backup made was a TTS backup, mysqlbackup skips it, and keeps searching the backup history until it finds the last non-TTS backup and then returns its end_lsn value.


      Do not use the history: mode if the previous backup was a full backup taken with the --no-connection option, which always turns off the recording of backup history and might cause errors for a subsequent incremental backup using this mode of the --incremental-base option.

  • --start-lsn=LSN

    Command-Line Format--start-lsn=LSN
    Permitted ValuesTypenumeric

    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 backup_history table's end_lsn column for the previous backup operation. Always used in combination with the --incremental option; not needed when you use the --incremental-base option; not recommended when you use the --incremental-with-redo-log-only mechanism for incremental backups.

  • --incremental-backup-dir=PATH

    Specifies the location for data of an incremental backup. When creating or restoring an incremental backup, the option serves the same function as --backup-dir does for backups and restores in general, and the option can in fact be used interchangeably with --backup-dir. See the description for --backup-dir for details.

    The location specified by --incremental-backup-dir is the same location you will specify with --incremental-base when you use that option for a subsequent incremental backup.

User Comments
Sign Up Login You must be logged in to post a comment.