On Thu, Nov 09, 2006, Bill Campbell wrote:

> In particular the rc.mysql run control %daily processing is written to
> handle normal ascii logs, and I’m not sure how to deal with the binary logs
> which seem to be incremented twice by the ‘‘rc mysql restart’’ 
> command in
> %daily processing.

Hi Bill,

there shouldn't be a restart action any longer on a daily (better:
nightly :) basis. Recently I commited a change agains CURRENT which
avoids restarting the server. I think, Ralf merged it to STABLE
already.

While plain text logs can be rotated via shtool (better: can be removed
after keeping X generations) automatically, this cannot be done when
it comes to binary logs without taking the risk of any data loss. You
have to make sure that all replication slaves already have fetched the
binary log you want to get rid of before you can safely remove it.
Needless to say that this cannot be done by the package easily since to
whole process depends very much on your local setup and configuration.
"Easily" in this case doesn't mean impossible but up to now noone has
implemented it ;)

For now, it might be easier if you write a little script suited to your
local needs which checks all the slaves periodically and purges the
older binary logs on master, if all slaves have picked them up already.
See the MySQL docs for details [1] (I hope this hasn't changed since I
read about the stuff last time).

[1] http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html

-cs
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to