xtrabackup-0.3, binaries and stream backup

We are coming with next version of xtrabackup – online backup solution for MySQL 5.0 / 5.1 and InnoDB standard version, plugin modification and XtraDB. We still consider it as alpha version, though it shows perfect stable results in our tests.

Let me address two often asked question about xtrabackup:
1) Does it work only with XtraDB or with InnoDB also ?
A: xtrabackup is designed to work with standard version of InnoDB in MySQL 5.0. MySQL 5.1 + standard InnoDB / InnoDB-plugin also are supported. It can fully work as drop-in replacement of innodbackup tool and InnoDB Hot Backup online backup.

2) Do we need to run patched MySQL, because the build instruction mentions the patch for MySQL ?
A: xtrabackup can be run with any version of MySQL: community release, enterprise release, percona builds, ourdelta distributions. You do not need to patch MySQL to run backup. The patch for MySQL is needed only to build the binaries of xtrabackup from source code. If you are not comfortable with building from source we provide the binaries for xtrabackup-0.3

New version of xtrabackup contains the feature which is missed in InnoDB Hot Backup – the backup can be produced as stream and copied to remote box or tape, or compressed without needs to store full copy of database on local disks. Very often there is no space to store second copy of database and you need to mount SAN/NAS for extra space. So now you can run it as

and get copy on remote box.
Also new features in 0.3 – it can be compiled against 5.1 and it supports OS X (sponsored feature).

Now we are developing to next feature which is not available for InnoDB users in any form so far – it is incremental and differential backups. Having that you will be able to make copy only of CHANGED data since given backup, there will not be needs to copy whole 250GB datafile if it changed only 1GB of data since yesterday.

You can download current binaries RPM for RHEL4 and RHEL5 (compatible with CentOS also) and DEB for Debian/Ubuntu there
By the same link you can find general .tar.gz with binaries which can be run on any modern Linux distribution.
By the same link you can download source code if you do not want to deal with bazaar and Launchpad.

The project lives on Launchpad : https://launchpad.net/percona-xtrabackup and you can report bug to Launchpad bug system:
https://launchpad.net/percona-xtrabackup/+filebug. The documentation is available on our Wiki

For general questions use our Pecona-discussions group, and for development question Percona-dev group.

For support, commercial and sponsorship inquiries contact Percona

Share this post

Comments (11)

  • Shlomi Noach

    The streaming option is great.

    Vadim: can you please elaborate on how incremental backups are made? I’m assuming you’re not using binlogs, but rather reading internal ibdata. In what manner does InnoDB allow for getting a delta from a given timestamp / transaction pos?

    March 14, 2009 at 12:00 am
  • Rasmus

    If this thing does what say it does we’ve definitely found our new favored backup tool. Looking forward to see a final version of this tool. Thank you for your work.

    March 14, 2009 at 4:27 am
  • Vadim


    Incremental backup are not finished yet, you can’t use it in current version.

    You are right – we are reading internal ibdata. There is such thing as LSN (Log Sequence Number) and each page has it, so basically we can retrieve only pages that older than given LSN.

    March 14, 2009 at 9:14 am
  • Vadim


    Our ideas come from real practical usage, that’s why we do it to cover practical needs.

    March 14, 2009 at 9:16 am
  • Shlomi Noach


    thanks for the info. In that case, the inremental backup would be those pages for which the LSN is larger then the one recorded in the full backup, right?
    How do you manage pages which contain uncommitted data? That is, tx#1 started, tx#2 started and committed, and due to dirty pages percent (or other reason), the page for tx#2 was flushed, along with the changes in tx#1.
    Do you also backup the undo buffer, then?

    It’s also interesting to estimate the percent of pages which will change between incremental backups. Is there some way to ask InnoDB how many pages have LSN greater than “x”?

    March 14, 2009 at 10:57 am
  • Vadim


    Yes, in incremental backup we will copy only pages with LSN greater then in full backup.
    We do backup undo buffer, it is located in ibdata1 system table space, there is also insert buffer.

    There is no easy way to say how many pages changed since LSN ‘x’ – only to scan all pages on disk.

    March 14, 2009 at 7:17 pm
  • Neil

    Would it be possible to output the binary log position that corresponds to the end of the backup? I don’t know if you have access to this info, but that would allow for a hot backup to be made, and then you could use the normal mysql binary logs to deal with changes made after the backup.

    March 17, 2009 at 1:28 pm
  • Neil

    Apologies; I looked at the sample output and see that the binary log position is already printed at the time of the backup. I’m assuming all uncompleted transactions after that “point it time” are rolled back as part of the backup process from the innodb logs.

    March 17, 2009 at 1:31 pm
  • Vadim


    There is xtrabackup_binlog_info which contains binary log position corresponding to time of backup.
    To do “point in time” recovery you should start from this position.

    March 17, 2009 at 1:56 pm
  • si

    innobackupex fail if a have innodb_data_home_dir & innodb_log_group_home_dir in my my.cnf

    innodb_data_home_dir = /var/lib/mysql
    innodb_log_group_home_dir = /var/lib/mysql

    #>innobackupex-1.5.1 –databases=saturn –user=root –password=******* –slave-info /tmp

    InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy.
    All Rights Reserved.

    This software is published under
    the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

    IMPORTANT: Please check that the backup run completes successfully.
    At the end of a successful backup run innobackup
    prints “innobackup completed OK!”.

    innobackupex: Using mysql Ver 14.14 Distrib 5.1.31, for unknown-linux-gnu (x86_64) using readline 5.1
    innobackupex: Using mysql server version 5.1.31-percona-log

    innobackupex: Created backup directory /tmp/2009-03-21_00-40-56
    090321 00:40:56 innobackupex: Starting mysql with options: –unbuffered –password=****** –user=root
    090321 00:40:56 innobackupex: Connected to database with mysql child process (pid=32443)
    090321 00:41:00 innobackupex: Connection to database server closed

    090321 00:41:00 innobackupex: Starting ibbackup with command: xtrabackup –backup –suspend-at-end –target-dir=/tmp/2009-03-21_00-40-56
    innobackupex: Waiting for ibbackup (pid=32450) to suspend
    innobackupex: Suspend file ‘/tmp/2009-03-21_00-40-56/xtrabackup_suspended’

    xtrabackup Ver alpha-0.3 for 5.0.77 unknown-linux-gnu (x86_64)
    >> log scanned up to (34 1558149409)
    090321 0:41:00 InnoDB: Operating system error number 2 in a file operation.
    InnoDB: The error means the system cannot find the path specified.
    InnoDB: File name /tmp/2009-03-21_00-40-56/var/lib/mysql/ibdata1
    InnoDB: File operation call: ‘open’.
    InnoDB: Cannot continue operation.
    innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex-1.5.1 line 427.

    March 20, 2009 at 3:53 pm
  • Vadim


    Thanks for report, I reported it there

    March 20, 2009 at 7:18 pm

Comments are closed.

Use Percona's Technical Forum to ask any follow-up questions on this blog topic.