xtrabackup for populating slaves

Just been playing with Percona’sXtraBackup and the initial results are very good. I have been using it to populate new slaves from a master with no real downtime.

I found a couple of bugs in the innobackupex script which have been reported. I needed to change line 1760 to



my $wildcard = ‘*.{frm,MYD,MYI,MRG,TRG,TRN,opt,par,ARZ,ARM}’;

Update : This bug has been fixed in the recent 0.9 version

As we use both partitioned and archive tables (it appears the bug also exists in Innodb’s version as well)

The slaves were set up with clean installs of MySQL 5.1.35 (centos5 64bit) and the my.cnf was copied over changing the server-id.

On the host I ran

innobackupex-1.5.1 –stream=tar /tmp/ –slave-info -password=????? | ssh USERNAME@HOSTNAME “tar xfi – -C /var/lib/mysql”

When this had completed on the slave I ran

¬†innobackupex-1.5.1 –apply-log –use-memory=2G /var/lib/mysql

MySQL was then started on the slave and the slave process started using the information from the xtrabackup_slave_info file created on the slave.

CHANGE MASTER TO MASTER_HOST=’????????’, MASTER_USER=’?????’, MASTER_PASSWORD=’??????’, MASTER_LOG_FILE=’mysql-bin.005959′, MASTER_LOG_POS=64860928

SLAVE START

Results are looking good so far

Advertisements
xtrabackup for populating slaves

One thought on “xtrabackup for populating slaves

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s