Binary Logging

Binary Logging

am 06.01.2010 20:34:50 von Steven Staples

Good afternoon.

I am having a weird problem with the Binary Logging of my MySQL.

For some reason, we have it on (still not sure why) but when i look in the
/var/log/mysql/ folder, the oldest file is from the 2009-12-27. The MySQL
service has not been restarted since the server came back up 150 days ago.
So somehow, they have been purged in the past, but i don't see a cron that
would have done it?

Anyway, my question is, is that I am currently moving data around, splitting
it into multiple tables, so there are TONNES of queries taking place, doing
inserts and such, and now I am up to 93GB in this folder.

I am starting to worry about running out of space on the harddrives, and we
have been talking about doing a master/slave setup, and from what I've read,
you need the binary logs on for replication?

Is this true? Should I keep them, or can i ditch them, and will it
re-create them when we do go to a master/slave setup?

Once i finish moving data around, i can remove the old tables that i am
moving them out of, so I don't really see a huge issue with dumping them, i
just want to make sure.

Thanks in advance!

Steve Staples.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: Binary Logging

am 06.01.2010 20:43:22 von Steven Staples

Silly me sees that there is an 'expire_log_days' in the my.cnf

But again, if i was to purge everything but the last day or 2... running
this command i found:

PURGE BINARY LOGS BEFORE DATE_SUB(NOW(), INTERVAL 2 DAY);

From the MySQL command line, will this be ok?

Steve.


-----Original Message-----
From: Steve Staples [mailto:sstaples@mnsi.net]
Sent: January 6, 2010 2:35 PM
To: mysql@lists.mysql.com
Subject: Binary Logging

Good afternoon.

I am having a weird problem with the Binary Logging of my MySQL.

For some reason, we have it on (still not sure why) but when i look in the
/var/log/mysql/ folder, the oldest file is from the 2009-12-27. The MySQL
service has not been restarted since the server came back up 150 days ago.
So somehow, they have been purged in the past, but i don't see a cron that
would have done it?

Anyway, my question is, is that I am currently moving data around, splitting
it into multiple tables, so there are TONNES of queries taking place, doing
inserts and such, and now I am up to 93GB in this folder.

I am starting to worry about running out of space on the harddrives, and we
have been talking about doing a master/slave setup, and from what I've read,
you need the binary logs on for replication?

Is this true? Should I keep them, or can i ditch them, and will it
re-create them when we do go to a master/slave setup?

Once i finish moving data around, i can remove the old tables that i am
moving them out of, so I don't really see a huge issue with dumping them, i
just want to make sure.

Thanks in advance!

Steve Staples.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=sstaples@mnsi.net

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.123/2592 - Release Date: 01/06/10
02:35:00


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Binary Logging

am 06.01.2010 20:47:22 von Michael Dykman

Yes, your settings will be fine. If you were already supporting
slaves which might remain dis-connected for extended periods of time,
you would have to take that into account when setting the purge
interval.

You don't need current binary logs for future slaves. You new slave
will start with a snapshot of the current state of the master
(excepting the binary logs) and only the binary logs produced by the
master from that point forward matter.

- michael dykman

On Wed, Jan 6, 2010 at 2:43 PM, Steve Staples wrote:
> Silly me sees that there is an 'expire_log_days' in the my.cnf
>
> But again, if i was to purge everything but the last day or 2... running
> this command i found:
>
> PURGE BINARY LOGS BEFORE DATE_SUB(NOW(), INTERVAL 2 DAY);
>
> From the MySQL command line, will this be ok?
>
> Steve.
>
>
> -----Original Message-----
> From: Steve Staples [mailto:sstaples@mnsi.net]
> Sent: January 6, 2010 2:35 PM
> To: mysql@lists.mysql.com
> Subject: Binary Logging
>
> Good afternoon.
>
> I am having a weird problem with the Binary Logging of my MySQL.
>
> For some reason, we have it on (still not sure why) but when i look in th=
e
> /var/log/mysql/ folder, the oldest file is from the 2009-12-27. =A0 The M=
ySQL
> service has not been restarted since the server came back up 150 days ago=
..
> So somehow, they have been purged in the past, but i don't see a cron tha=
t
> would have done it?
>
> Anyway, my question is, is that I am currently moving data around, splitt=
ing
> it into multiple tables, so there are TONNES of queries taking place, doi=
ng
> inserts and such, and now I am up to 93GB in this folder.
>
> I am starting to worry about running out of space on the harddrives, and =
we
> have been talking about doing a master/slave setup, and from what I've re=
ad,
> you need the binary logs on for replication?
>
> Is this true? =A0Should I keep them, or can i ditch them, and will it
> re-create them when we do go to a master/slave setup?
>
> Once i finish moving data around, i can remove the old tables that i am
> moving them out of, so I don't really see a huge issue with dumping them,=
i
> just want to make sure.
>
> Thanks in advance!
>
> Steve Staples.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dsstaples@mnsi=
..net
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.725 / Virus Database: 270.14.123/2592 - Release Date: 01/06/=
10
> 02:35:00
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmail=
..com
>
>



--=20
- michael dykman
- mdykman@gmail.com

May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

RE: Binary Logging

am 06.01.2010 20:51:24 von Gavin Towey

Binary logs are pretty important for backups as well. Most often people ta=
ke a full backup using mysqldump or filesystem snapshots, and then back up =
their binlogs. With the full backup + all the binlogs since then, you can =
recover to any point in time you choose.

If you're not currently running replication then you don't really need thos=
e binlogs. Asking "will this be ok" is more a matter for you to decide in=
terms of your backup procedures.

Once you start using replication, you only need to keep binlogs around as l=
ong as it takes your slaves to copy the data from the master; with a fast n=
etwork that can be seconds.

You can also use FLUSH LOGS; to force mysql to start a new binlog file, the=
n purge all files before the most current one.

Regards,
Gavin Towey

-----Original Message-----
From: Steve Staples [mailto:sstaples@mnsi.net]
Sent: Wednesday, January 06, 2010 11:43 AM
To: mysql@lists.mysql.com
Subject: RE: Binary Logging

Silly me sees that there is an 'expire_log_days' in the my.cnf

But again, if i was to purge everything but the last day or 2... running
this command i found:

PURGE BINARY LOGS BEFORE DATE_SUB(NOW(), INTERVAL 2 DAY);

From the MySQL command line, will this be ok?

Steve.


-----Original Message-----
From: Steve Staples [mailto:sstaples@mnsi.net]
Sent: January 6, 2010 2:35 PM
To: mysql@lists.mysql.com
Subject: Binary Logging

Good afternoon.

I am having a weird problem with the Binary Logging of my MySQL.

For some reason, we have it on (still not sure why) but when i look in the
/var/log/mysql/ folder, the oldest file is from the 2009-12-27. The MySQL
service has not been restarted since the server came back up 150 days ago.
So somehow, they have been purged in the past, but i don't see a cron that
would have done it?

Anyway, my question is, is that I am currently moving data around, splittin=
g
it into multiple tables, so there are TONNES of queries taking place, doing
inserts and such, and now I am up to 93GB in this folder.

I am starting to worry about running out of space on the harddrives, and we
have been talking about doing a master/slave setup, and from what I've read=
,
you need the binary logs on for replication?

Is this true? Should I keep them, or can i ditch them, and will it
re-create them when we do go to a master/slave setup?

Once i finish moving data around, i can remove the old tables that i am
moving them out of, so I don't really see a huge issue with dumping them, i
just want to make sure.

Thanks in advance!

Steve Staples.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dsstaples@mnsi.net

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.725 / Virus Database: 270.14.123/2592 - Release Date: 01/06/10
02:35:00


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgtowey@ffn.com


This message contains confidential information and is intended only for the=
individual named. If you are not the named addressee, you are notified th=
at reviewing, disseminating, disclosing, copying or distributing this e-mai=
l is strictly prohibited. Please notify the sender immediately by e-mail i=
f you have received this e-mail by mistake and delete this e-mail from your=
system. E-mail transmission cannot be guaranteed to be secure or error-fre=
e as information could be intercepted, corrupted, lost, destroyed, arrive l=
ate or incomplete, or contain viruses. The sender therefore does not accept=
liability for any loss or damage caused by viruses or errors or omissions =
in the contents of this message, which arise as a result of e-mail transmis=
sion. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089,=
USA, FriendFinder.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg