Re: Rotation of binary logs on replication master?

2002-03-22 Thread Guy Davis

On Thu, 2002-03-21 at 13:07, Shawn McCool wrote:
> /usr/local/bin/mysql -hhostname -uusername -ppassword -e "flush logs;"

I guess I wasn't clear that I wanted old binary logs removed.  I don't
want to have to manually worry about disk space due to ever increasing
binary logs.

It seems to me FLUSH LOGS just opens a new binary log.  The old, unused
ones are still left in place.  I'm looking for a rotating set of say 4
kept.  Anything older is deleted.  Logrotate does this for Apache's logs
for example.

The RESET command seems to delete all binary logs.  I don't want them
all deleted, just very old ones.  Any ideas?  Thanks.

Flush logs did the following:

[root@nachos root]# du -h /var/lib/mysql/nachos*
4.0k/var/lib/mysql/nachos-bin.001
700M/var/lib/mysql/nachos-bin.002
4.0k/var/lib/mysql/nachos-bin.003
1.1G/var/lib/mysql/nachos-bin.004
350M/var/lib/mysql/nachos-bin.005
4.0k/var/lib/mysql/nachos-bin.006
189M/var/lib/mysql/nachos-bin.007
384M/var/lib/mysql/nachos-bin.008
4.0k/var/lib/mysql/nachos-bin.009
1.1G/var/lib/mysql/nachos-bin.010
289M/var/lib/mysql/nachos-bin.011
1.1G/var/lib/mysql/nachos-bin.012
1.1G/var/lib/mysql/nachos-bin.013
684M/var/lib/mysql/nachos-bin.014
4.0k/var/lib/mysql/nachos-bin.index
332k/var/lib/mysql/nachos-slow.log
4.0k/var/lib/mysql/nachos.us.pason.com.pid

mysql> FLUSH LOGS;

[root@nachos root]# du -h /var/lib/mysql/nachos*
4.0k/var/lib/mysql/nachos-bin.001
700M/var/lib/mysql/nachos-bin.002
4.0k/var/lib/mysql/nachos-bin.003
1.1G/var/lib/mysql/nachos-bin.004
350M/var/lib/mysql/nachos-bin.005
4.0k/var/lib/mysql/nachos-bin.006
189M/var/lib/mysql/nachos-bin.007
384M/var/lib/mysql/nachos-bin.008
4.0k/var/lib/mysql/nachos-bin.009
1.1G/var/lib/mysql/nachos-bin.010
289M/var/lib/mysql/nachos-bin.011
1.1G/var/lib/mysql/nachos-bin.012
1.1G/var/lib/mysql/nachos-bin.013
684M/var/lib/mysql/nachos-bin.014
4.0k/var/lib/mysql/nachos-bin.015
4.0k/var/lib/mysql/nachos-bin.index
332k/var/lib/mysql/nachos-slow.log
4.0k/var/lib/mysql/nachos.us.pason.com.pid

-- 
Guy Davis   Phone:   (403) 301-3426   
Pason Systems   Fax: (403) 301-3499
PGP: 65BA 484B 0B96 5F3B 4D40  DCA2 B2AE 6B5A F52B 1445

-
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




Re: Rotation of binary logs on replication master?

2002-03-21 Thread James Housley

Guy Davis wrote:
> 
> Just wondering if any Linux users of MySQL out there had written a
> logrotate configuration file for dealing with MySQL binary logs on a
> replication Master.
> 
> I want to rotate these logs (6.5 GB now) as some are over a month old.
> However, I don't want to confuse any of the replicating slaves.  Any
> tips?

mysqladmin -ppassword -u root flush-logs

Jim
-- 
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -
[EMAIL PROTECTED]  http://www.FreeBSD.org The Power to Serve
[EMAIL PROTECTED]  http://www.TheHousleys.net
[EMAIL PROTECTED]  http://www.SimTel.Net
-
Progress (n) : What led from smart users in front of dumb terminals to
dumb users in front of smart terminals.

-
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




Re: Rotation of binary logs on replication master?

2002-03-21 Thread Shawn McCool

/usr/local/bin/mysql -hhostname -uusername -ppassword -e "flush logs;"

Guy Davis wrote:

>Just wondering if any Linux users of MySQL out there had written a
>logrotate configuration file for dealing with MySQL binary logs on a
>replication Master.
>
>I want to rotate these logs (6.5 GB now) as some are over a month old. 
>However, I don't want to confuse any of the replicating slaves.  Any
>tips?
>
>Thanks.
>



-
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




Rotation of binary logs on replication master?

2002-03-21 Thread Guy Davis

Just wondering if any Linux users of MySQL out there had written a
logrotate configuration file for dealing with MySQL binary logs on a
replication Master.

I want to rotate these logs (6.5 GB now) as some are over a month old. 
However, I don't want to confuse any of the replicating slaves.  Any
tips?

Thanks.

-- 
Guy Davis   Phone:   (403) 301-3426   
Pason Systems   Fax: (403) 301-3499
PGP: 65BA 484B 0B96 5F3B 4D40  DCA2 B2AE 6B5A F52B 1445

-
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