Re: Cleaning up old files

2011-11-15 Thread Hal�sz S�ndor
 2011/11/14 18:01 +, Rob Tanner 
So what are those files and can I delete all but the most recent? 

And if you look up replication, as others already have said, you will find that 
the command reset master will do just that--if, as Harald hinted, you really 
_want_ replication, or at least the output needed for it.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Cleaning up old files

2011-11-15 Thread Hal�sz S�ndor
 2011/11/14 18:01 +, Rob Tanner 
So what are those files and can I delete all but the most recent? 

And if you look up replication, as others already have said, you will find that 
the command purge binary logs to 'mysql-bin.' will do just that--if, as 
Harald hinted, you really _want_ replication, or at least the output needed for 
it.

I wrote reset master by mistake: that clears out _all_ the binary logs.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Cleaning up old files

2011-11-14 Thread Rob Tanner
Hi,

In my MySQL directory, I have more than a few gig and a half sized files, 
mysql-bin.01, mysql-bin.01 and et cetera.  They date from today all the 
way back to early 2010.  I don't know exactly what those files are but I would 
like to delete as many as are no longer is use since I had a 40GB partition 
fill up over the weekend which resulted in bringing down our web server.  So 
what are those files and can I delete all but the most recent?

Thanks.


Rob Tanner
UNIX Services Manager
Linfield College, McMinnville Oregon



Re: Cleaning up old files

2011-11-14 Thread Reindl Harald


Am 14.11.2011 19:01, schrieb Rob Tanner:

 In my MySQL directory, I have more than a few gig and a half sized files, 
 mysql-bin.01, 
 mysql-bin.01 and et cetera.  They date from today all the way back to 
 early 2010.  
 I don't know exactly what those files are but I would like to delete as many 
 as are no longer 
 is use since I had a 40GB partition fill up over the weekend which resulted 
 in bringing down 
 our web server.  So what are those files and can I delete all but the most 
 recent?

look in the documentation for Replication and disable it if it is not used
or consider to configure 'expire_logs_days'



signature.asc
Description: OpenPGP digital signature


Re: Cleaning up old files

2011-11-14 Thread Michael Dykman
Those are your binary logs.  They store the data stream to be consumed
by your slaves.
.http://dev.mysql.com/doc/refman/5.0/en/binary-log.html

Are you using replication?  If so, you need to go to each of your
slaves and run the command 'SHOW MASTER STATUS;'. That will tell you
which files are currently being consumed by your slaves. Anything
older than the oldest one can be safely deleted.  (the older ones are
those with the lowest numbers embedded in the filename.

If you are not using replication,  erase them all.  You might also
want to turn of 'log-bin' in your configs.

 - michael dykman


On Mon, Nov 14, 2011 at 1:01 PM, Rob Tanner rtan...@linfield.edu wrote:

 Hi,

 In my MySQL directory, I have more than a few gig and a half sized files, 
 mysql-bin.01, mysql-bin.01 and et cetera.  They date from today all 
 the way back to early 2010.  I don't know exactly what those files are but I 
 would like to delete as many as are no longer is use since I had a 40GB 
 partition fill up over the weekend which resulted in bringing down our web 
 server.  So what are those files and can I delete all but the most recent?

 Thanks.


 Rob Tanner
 UNIX Services Manager
 Linfield College, McMinnville Oregon




--
 - michael dykman
 - mdyk...@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=arch...@jab.org



Re: Cleaning up old files

2011-11-14 Thread Basil Daoust
If you search on mysql-bin.01 you get a lot of good info.
o They are mysql log files it contains all the queries u can view
these files with the command mysqlbinlog just man it for more details
o These are your binary log files.. you might not want to switch them
off depending on your setup - but you can purge them (look in the
manual for PURGE MASTER LOGS)

I've heard people talk about using them for recovery.
I know they are used for replication.
You can delete/purge the old ones that you have a backup for, because
trying to recover by playing them all back is probably not a realistic
solution.

Basil

On Mon, Nov 14, 2011 at 12:01 PM, Rob Tanner rtan...@linfield.edu wrote:
 Hi,

 In my MySQL directory, I have more than a few gig and a half sized files, 
 mysql-bin.01, mysql-bin.01 and et cetera.  They date from today all 
 the way back to early 2010.  I don't know exactly what those files are but I 
 would like to delete as many as are no longer is use since I had a 40GB 
 partition fill up over the weekend which resulted in bringing down our web 
 server.  So what are those files and can I delete all but the most recent?

 Thanks.


 Rob Tanner
 UNIX Services Manager
 Linfield College, McMinnville Oregon



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Cleaning up old files

2011-11-14 Thread Andrew Moore
The binary log is useful for more then just replication and can be used to
take incremental backups or to perform forensics on what your server has
done. I would recommend learning how to use them to your advantage over
turning binary logging off as some have recommended. Make sure you're
monitoring your storage so you don't end up running out of space. Use
expire_logs_days
to auto purge your logs and if you have replication in place ensure that
this is set high enough so that you don't remove logs that haven't been
used by the slave.



On Mon, Nov 14, 2011 at 6:15 PM, Basil Daoust bdao...@lemonfree.com wrote:

 If you search on mysql-bin.01 you get a lot of good info.
 o They are mysql log files it contains all the queries u can view
 these files with the command mysqlbinlog just man it for more details
 o These are your binary log files.. you might not want to switch them
 off depending on your setup - but you can purge them (look in the
 manual for PURGE MASTER LOGS)

 I've heard people talk about using them for recovery.
 I know they are used for replication.
 You can delete/purge the old ones that you have a backup for, because
 trying to recover by playing them all back is probably not a realistic
 solution.

 Basil

 On Mon, Nov 14, 2011 at 12:01 PM, Rob Tanner rtan...@linfield.edu wrote:
  Hi,
 
  In my MySQL directory, I have more than a few gig and a half sized
 files, mysql-bin.01, mysql-bin.01 and et cetera.  They date from
 today all the way back to early 2010.  I don't know exactly what those
 files are but I would like to delete as many as are no longer is use since
 I had a 40GB partition fill up over the weekend which resulted in bringing
 down our web server.  So what are those files and can I delete all but the
 most recent?
 
  Thanks.
 
 
  Rob Tanner
  UNIX Services Manager
  Linfield College, McMinnville Oregon
 
 

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