Here's one which takes log rotation a step further than mysql provides for. It is run on the slaves to keep track of their position and then run on the master to purge up to the earliest slave position. This is useful because you can't reliably get all the slaves' latest position by looking at a master. If a slave is down temporarily, it will not show up on the master.
http://www.chelsea.net/~mprewitt/mtop/utils/purge_replication_log Adam Arrowood wrote: > > Anyone know of/have recommendations on a perl script to do > replication (binary) log rotation? I have a master with > multiple slaves. I need to be able to rotate the binary log > of the master and get rid of any old files that the slaves > aren't reading. > > I'm looking for a script that will talk to > the slaves, queries their status with "SHOW SLAVE STATUS", > find the lowest common master file, and then connect to > the master and issue a "PURGE MASTER LOG TO" query . > > I'm pretty sure that I could write it myself, but why > "reinvent the wheel" if someone has already written this... > > thanks, > adam a > -- > Adam Arrowood || http://www.gatech.edu/adam || [EMAIL PROTECTED] > Office of Information Technology/O&E/CS || (404) 894-0372 > Georgia Institute of Technology, Atlanta, GA USA > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php