Skip to content
Starting November 2023 Percona XtraBackup 2.4 has reached EOL status. If you have 5.7 databases, we encourage you to upgrade to 8.0 and then install Percona XtraBackup 8.0. Learn more

logo
Percona XtraBackup
Store backup history on the server
Initializing search
    percona/pxb-docs
    percona/pxb-docs
    • Home
      • About Percona XtraBackup
      • How Percona XtraBackup Works
      • Understand version numbers
      • Installing Percona XtraBackup 2.4
      • Installing Percona XtraBackup on Debian and Ubuntu
      • Installing Percona XtraBackup on Red Hat Enterprise Linux and CentOS
      • Installing Percona XtraBackup from a Binary Tarball
      • Compiling and Installing from Source Code
      • Running Percona XtraBackup in a Docker container
      • Connection and Privileges Needed
      • Configuring xtrabackup
      • The Backup Cycle - Full Backups
      • Incremental Backup
      • Compressed Backup
      • Encrypted Backup
      • Percona XtraBackup User Manual
      • Throttling Backups
      • Lockless binary log information
      • Encrypted InnoDB Tablespace Backups
      • lock-ddl-per-table Option Improvements
      • How-tos and Recipes
        • Release notes index
        • Percona XtraBackup 2.4.29 (2023-12-18)
        • Percona XtraBackup 2.4.28 (2023-04-04)
        • Percona XtraBackup 2.4.27 (2022-12-06)
        • Percona XtraBackup 2.4.26
        • Percona XtraBackup 2.4.25
        • Percona XtraBackup 2.4.24
        • Percona XtraBackup 2.4.23
        • Percona XtraBackup 2.4.22
        • Percona XtraBackup 2.4.21
        • Percona XtraBackup 2.4.20
        • Percona XtraBackup 2.4.19
        • Percona XtraBackup 2.4.18
        • Percona XtraBackup 2.4.17
        • Percona XtraBackup 2.4.16
        • Percona XtraBackup 2.4.15
        • Percona XtraBackup 2.4.14
        • Percona XtraBackup 2.4.13
        • Percona XtraBackup 2.4.12
        • Percona XtraBackup 2.4.11
        • Percona XtraBackup 2.4.10
        • Percona XtraBackup 2.4.9
        • Percona XtraBackup 2.4.8
        • Percona XtraBackup 2.4.7-2
        • Percona XtraBackup 2.4.7
        • Percona XtraBackup 2.4.6
        • Percona XtraBackup 2.4.5
        • Percona XtraBackup 2.4.4
        • Percona XtraBackup 2.4.3
        • Percona XtraBackup 2.4.2
        • Percona XtraBackup 2.4.1
      • The xtrabackup Option Reference
      • The innobackupex Option Reference
      • The xbcloud Binary
      • Exponential Backoff
      • Using the xbcloud binary with Microsoft Azure Cloud Storage
      • The xbcrypt binary
      • The xbstream binary
      • Known issues and limitations
      • Frequently Asked Questions
      • Glossary
      • Index of files created by Percona XtraBackup
      • Trademark policy
      • Copyright and licensing information
      • Version Checking

    • Privileges
    • PERCONA_SCHEMA.XTRABACKUP_HISTORY table
    • Limitations

    Store backup history on the server¶

    Percona XtraBackup supports storing the backups history on the server. This feature was implemented in Percona XtraBackup 2.2. Storing backup history on the server was implemented to provide users with additional information about backups that are being taken. Backup history information will be stored in the PERCONA_SCHEMA.XTRABACKUP_HISTORY table.

    To use this feature three new innobackupex options have been implemented:

    • innobackupex --history = : This option enables the history feature and allows the user to specify a backup series name that will be placed within the history record.

    • innobackupex --incremental-history-name = : This option allows an incremental backup to be made based on a specific history series by name. innobackupex will search the history table looking for the most recent (highest to_lsn) backup in the series and take the to_lsn value to use as it’s starting lsn. This is mutually exclusive with innobackupex --incremental-history-uuid, innobackupex --incremental-basedir and innobackupex --incremental-lsn options. If no valid LSN can be found (no series by that name) innobackupex will return with an error.

    • innobackupex --incremental-history-uuid = : Allows an incremental backup to be made based on a specific history record identified by UUID. innobackupex will search the history table looking for the record matching UUID and take the to_lsn value to use as it’s starting LSN. This options is mutually exclusive with innobackupex --incremental-basedir, innobackupex --incremental-lsn and innobackupex --incremental-history-name options. If no valid LSN can be found (no record by that UUID or missing to_lsn), innobackupex will return with an error.

    Note

    Backup that’s currently being performed will NOT exist in the xtrabackup_history table within the resulting backup set as the record will not be added to that table until after the backup has been taken.

    If you want access to backup history outside of your backup set in the case of some catastrophic event, you will need to either perform a mysqldump, partial backup or SELECT * on the history table after innobackupex completes and store the results with you backup set.

    Privileges¶

    User performing the backup will need following privileges:

    • CREATE privilege in order to create the PERCONA_SCHEMA.xtrabackup_history database and table.

    • INSERT privilege in order to add history records to the PERCONA_SCHEMA.xtrabackup_history table.

    • SELECT privilege in order to use innobackupex --incremental-history-name or innobackupex --incremental-history-uuid in order for the feature to look up the innodb_to_lsn values in the PERCONA_SCHEMA.xtrabackup_history table.

    PERCONA_SCHEMA.XTRABACKUP_HISTORY table¶

    This table contains the information about the previous server backups. Information about the backups will only be written if the backup was taken with innobackupex –history option.

    Column Name Description
    uuid Unique backup id
    name User provided name of backup series. There may be multiple entries with the same name used to identify related backups in a series.
    tool_name Name of tool used to take backup
    tool_command Exact command line given to the tool with –password and –encryption_key obfuscated
    tool_version Version of tool used to take backup
    ibbackup_version Version of the xtrabackup binary used to take backup
    server_version Server version on which backup was taken
    start_time Time at the start of the backup
    end_time Time at the end of the backup
    lock_time Amount of time, in seconds, spent calling and holding locks for FLUSH TABLES WITH READ LOCK
    binlog_pos Binlog file and position at end of FLUSH TABLES WITH READ LOCK
    innodb_from_lsn LSN at beginning of backup which can be used to determine prior backups
    innodb_to_lsn LSN at end of backup which can be used as the starting lsn for the next incremental
    partial Is this a partial backup, if N that means that it’s the full backup
    incremental Is this an incremental backup
    format Description of result format (file, tar, xbstream)
    compressed Is this a compressed backup
    encrypted Is this an encrypted backup

    Limitations¶

    • innobackupex --history option must be specified only on the innobackupex command line and not within a configuration file in order to be effective.

    • innobackupex --incremental-history-name and innobackupex --incremental-history-uuid options must be specified only on the innobackupex command line and not within a configuration file in order to be effective.

    Contact us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.

    2022-07-19
    Percona LLC and/or its affiliates, © 2024 Cookie Preferences
    Made with Material for MkDocs