Incremental backups with Xtrabackup and other strange things

  • Filter
  • Time
  • Show
Clear All
new posts

  • Incremental backups with Xtrabackup and other strange things


    I was experimenting with the Xtrabackup tool, hoping to get incremental backups working finally. This is on Ubuntu 10.10 with Percona's 5.1.55-rel12.6-log running full innodb databases. Xtrabackup version 1.4-193.

    I believe I have it working, however, some bizarre output is being displayed during the backup process.

    Here's what I'm running:

    innobackupex-1.5.1 --defaults-file=/etc/mysql/.my1.cnf /media/host_share/backups/

    The above creates a full backup with the defaults-file having extra information that shouldn't be accessible (ps aux etc...) like login info

    This creates a directory of about 2GB, consistent with the ib* files in the mysql datadir.

    I then insert 3 records into 1 table and then run an incremental with the following command:

    xtrabackup --backup --defaults-file=/etc/mysql/.my1.cnf --target-dir=/media/host_share/backups/2011-04-12_10-55-54/incremental1 --incremental-basedir=/media/host_share/backups/2011-04-12_10-55-54/

    The output has several ">> log scanned up to (2630529288)" lines and the incremental backup of files with three rows takes 97 seconds!

    Final output is:

    xtrabackup: The latest check point (for incremental): '2630529288'>> log scanned up to (2630529288)xtrabackup: Stopping log copying thread.xtrabackup: Transaction log of lsn (2630529288) to (2630529288) was copied.Elapsed time: 97 seconds.

    The contents of /media/host_share/backups/2011-04-12_10-55-54/incremental1 are three files:

    -rwxrwxrwx 1 root root 144K 2011-04-12 13:43 ibdata1.delta-rwxrwxrwx 1 root root 68 2011-04-12 13:45 xtrabackup_checkpoints-rwxrwxrwx 1 root root 2.5K 2011-04-12 13:43 xtrabackup_logfile

    I then decided to take a 2nd full backup which started also showing several lines with "log scanned up to..." abd the backup took around 60 seconds longer than the first one did.

    I know that MySQL's Enterprise Backup (innobackup?) has an atoi() bug with large LSNs but that completely stops the incremental backup from occurring (http://bugs.mysql.com/bug.php?id=57681), is something similar here occurring or is this something that I have to live with?

    Thank you.

  • #2
    What is the bizarre output? Nothing you posted looks wrong to me. I don't think there is any bug, rather, there is a performance problem (which we might consider to be a bug) in that xtrabackup will visit every page in the database and check its LSN to determine whether it has changed since the last backup. That simply takes a while. We're going to introduce a new way of doing incrementals in the future which will avoid this.


    • #3
      Thanks for your reply

      What I meant by bizarre was the repeated ">> log scanned up to (2630529288)" statements displayed on the console and I was worried that I was hitting something related to what I observed in the Enterprise Backup tool. If that output corresponds to the page checks and is expected, then all is well, though I do wish it were just a little faster on the incremental backups and I wait for any updates impatiently

      Thanks again!



      • #4
        That output is normal. I've added a sample of it to the documentation. Thanks!