May 7, 2009

Btw xtrabackup is not only backup..

Posted by Vadim |

It is obvious thing for me, but I just figured out it may be not common understanding. Xtrabackup is also can be used (not only can, but we actually use it this way) to clone one slave to another, or just setup new slave from the master. And it is done in almost non-blocking way ( true for InnoDB setups) for cloned server. Here is command

CODE:
  1. innobackupex-1.5.1 --stream=tar /tmp/ --slave-info | ssh user@DESTSERVER "tar xfi - -C /DESTDIR"

When it finished on destination server you run

CODE:
  1. innobackupex-1.5.1 --apply-log --use-memory=2G  /DESTDIR

And you have ready database directory, just copy my.cnf from original server and start mysqld.

Related posts: :Xtrabackup, doing once…::XtraBackup: Open Source Alternative for Innodb Hot Backup call for ideas::xtrabackup-0.3, binaries and stream backup:
 

3 Comments »

  1. 1. Bruce Bristol

    Remember to change the slave’s ’server_id’ variable if it’s in your my.cnf copied from the original server.

    Comment :: May 8, 2009 @ 2:24 pm

  2. 2. anonymous

    wow

    Comment :: May 12, 2009 @ 6:33 am

  3. 3. John Sheppard

    I understand Xtrabackup is InnoDB only. Since 2001 I’ve been using
    Dave Brown’s perl script mysql backup. I
    should very much appreciate knowing what better options are available
    now ?

    Comment :: May 12, 2009 @ 10:02 am

 

Subscribe without commenting

Trackbacks/Pingbacks