Hi Warren, I would generally keep the binary log until you have done a full backup. Once that is done, all the transactions that are contained in those logs are now committed and saved in your database backup.
All binary logs may be deleted that were created before that backup took place. The main reason for this is that it allows you to restore from your last backup and then "roll forward" all transactions (I use the term to describe anything modifying the database and logged in the binary log) until the database is back up to date. Regards --------------------------------------------------------------- ********** _/ ********** David Logan ******* _/ ******* ITO Delivery Specialist - Database ***** _/ ***** Hewlett-Packard Australia Ltd **** _/_/_/ _/_/_/ **** E-Mail: [EMAIL PROTECTED] **** _/ _/ _/ _/ **** Desk: +618 8408 4273 **** _/ _/ _/_/_/ **** Mobile: 0417 268 665 ***** _/ ****** ****** _/ ******** Postal: 148 Frome Street, ******** _/ ********** Adelaide SA 5001 Australia i n v e n t --------------------------------------------------------------- -----Original Message----- From: Warren Crigger [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 August 2006 9:52 AM To: mysql@lists.mysql.com Cc: [EMAIL PROTECTED] Subject: MySQL Replication Binary Logs - How Long to Keep? I've just recently set up MySQL replication amongst two servers so I'm not too familiar with it. I was cleaning up my /var filesystem and found the binary data below being stored in /var/lib/mysql, taking up 1.5gb. I did a little reading on mysql.org docs. My interpretation was that you can have it replicate every so often, then you can purge these after that happens..however, my replication is instantaneous. I can insert a record on the master and then go select it on the slave immediately. Is there any reason to keep this data? It's replicated to the 2nd server, in addition to dumps of the more important databases nightly, and dumps of the entire server weekly, which go to different physical drives and then ultimately off-site. I like redudancy obviously, however, this seems pretty useless to me. If it is of use, is there a way I can put this on a different filesystem, keeping the databases themselves within /var/lib/mysql? Thanks, Warren [EMAIL PROTECTED] mysql]# pwd /var/lib/mysql [EMAIL PROTECTED] mysql]# ls -lart |grep repl -rw-rw---- 1 mysql mysql 3088434 Jun 11 04:02 repl.001 -rw-rw---- 1 mysql mysql 107 Jun 11 04:02 repl.002 -rw-rw---- 1 mysql mysql 188387006 Jun 18 04:02 repl.003 -rw-rw---- 1 mysql mysql 107 Jun 18 04:02 repl.004 -rw-rw---- 1 mysql mysql 107 Jun 25 04:02 repl.006 -rw-rw---- 1 mysql mysql 156749380 Jun 25 04:02 repl.005 -rw-rw---- 1 mysql mysql 153489679 Jul 2 04:02 repl.007 -rw-rw---- 1 mysql mysql 107 Jul 2 04:02 repl.008 -rw-rw---- 1 mysql mysql 107 Jul 9 04:02 repl.010 -rw-rw---- 1 mysql mysql 140922795 Jul 9 04:02 repl.009 -rw-rw---- 1 mysql mysql 58638790 Jul 11 17:30 repl.011 -rw-rw---- 1 mysql mysql 38410 Jul 11 17:46 repl.012 -rw-rw---- 1 mysql mysql 5927431 Jul 12 09:00 repl.013 -rw-rw---- 1 mysql mysql 80007235 Jul 16 04:02 repl.014 -rw-rw---- 1 mysql mysql 107 Jul 16 04:02 repl.015 -rw-rw---- 1 mysql mysql 107 Jul 23 04:02 repl.017 -rw-rw---- 1 mysql mysql 155468996 Jul 23 04:02 repl.016 -rw-rw---- 1 mysql mysql 107 Jul 30 04:02 repl.019 -rw-rw---- 1 mysql mysql 155806419 Jul 30 04:02 repl.018 -rw-rw---- 1 mysql mysql 107 Aug 6 04:02 repl.021 -rw-rw---- 1 mysql mysql 159420166 Aug 6 04:02 repl.020 -rw-rw---- 1 mysql mysql 6366383 Aug 6 13:33 repl.022 -rw-rw---- 1 mysql mysql 1138297 Aug 6 17:36 repl.023 -rw-rw---- 1 mysql mysql 264 Aug 6 17:40 repl.index -rw-rw---- 1 mysql mysql 43014905 Aug 9 00:03 repl.024 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]