1. Download the latest .tar.gz from Percona:
$ cd /tmp
$ wget http://www.percona.com/mysql/xtrabackup/0.5/xtrabackup-0.5-macos.x86_64.tar.gz
$ tar -xzf xtrabackup-*-macos.x86_64.tar.gz
$ cd xtrabackup*
2. This directory should contain
xtrabackup. You need to install these into a directory that appears in your
$PATH. In my case, I am going to group it install it where my MySQL binaries are located (/usr/local/mysql/bin):
$ cp * /usr/local/mysql/bin/
3. Create a directory where you want your backup to go. In this case it's just a demo - so I'll use my tmpdir.
$ mkdir -p /tmp/backup
4. Test running the backup:
$ innobackupex-1.5.1 /tmp/backup/
innobackupex-1.5.1is a Perl script that insures that all of your non-InnoDB tables and other MySQL meta data is backed up. You can think of it as a wrapper around
xtrabackup, which backs up the data inside InnoDB.
5. Check the data is backed up:
$ cd /tmp/backup
$ cd 2009-04-08_15-12-52
backup-my.cnf mysql-stderr xtrabackup_binlog_info
employees mysql-stdout xtrabackup_checkpoints
ibdata1 test xtrabackup_logfile
6. Attempt a recovery:
innobackupex-1.5.1 --copy-back /tmp/backup/2009-04-08_15-12-52
Disclaimer: In case you didn't know it, I work for Percona - the company that wrote xtrabackup.