After a discussion with Adam Dixon over ways to retrieve binlogs from remote servers we came to the conclusion that mysqlbinlog should have a way to retrieve binlogs direct from a remote mysql server and save them in raw binlog format.

So after a little bit of tinkering I came up with a small prototype patch to do this, to use this simply do:

mysqlbinlog --raw --result-file=out.bin -t -R --host=192.168.1.101 mysqld-bin.000001

This can probably be extended to wait for more data rather than ending when it hits the end of the log, but this is just a proof of concept for now.

This new patch against MySQL 5.1.31 can be found here.

Comments:

This patch is currently under further development with massive improvements (and a couple of bug fixes) in the pipeline. Watch this space...

Posted by LinuxJedi on February 20, 2009 at 10:00 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by LinuxJedi