Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For data redundancy goals, I want to record the binlog of a few hundred mysql servers in a central location. To run a full replicator for each stream would require lots of resources (multiple servers) because the execution of the statements take a lot of cpu. My assumption is that just recording the binlog would take significant fewer resources.

How to do it? I found http://search.cpan.org/~alfie/MySQL-Replication-0.0.2/bin/MySQLReplicationClient.pl but that seems to use non-native replication (it requires an extra database) and seems to be in alpha state.

Perhaps another solution is to install a full mysql server as a replication slave, but somehow disable the execution of replicated statements and just log them.

Thanks!

share|improve this question
    
Rsync the files to your central directory? –  NickW Apr 16 '13 at 10:20
    
I would prefer a "push" hook at the same time the master writes the updates to the binlog. Perhaps I could use lsyncd and inotify. It feels a bit hackish though ;) –  Willem Apr 16 '13 at 10:39
    
Yeah, it does.. Maybe you could have them write to a central NFS mount? I'd guess you'd have to deal with some serious contention though. –  NickW Apr 16 '13 at 10:43
1  
Have you looked at mysqlbinlog? dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html –  NickW Apr 16 '13 at 10:45

1 Answer 1

up vote 0 down vote accepted

Thanks to NickW!!

This is exactly what I need:

http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html

--stop-never: Stay connected to the server after reaching the end of the last log file and continue to read new events.

I'm running 5.5 but I'll backport the 5.6 mysqlbinlog util.

Also of interest might be Percona Xtrabackup with xbstream continous backup feature: http://www.percona.com/doc/percona-xtrabackup/glossary.html#term-xbstream

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.