Reclaim space on full db servers
From Wikitech
(Difference between revisions)
ArielGlenn (Talk | contribs) (→Remove old bin logs) |
ArielGlenn (Talk | contribs) |
||
| Line 17: | Line 17: | ||
and this will remove all bin logs older than the specified file. It syncs up the index file for these logs as well. | and this will remove all bin logs older than the specified file. It syncs up the index file for these logs as well. | ||
| + | |||
| + | [[Category:How-To]] | ||
| + | [[Category:MySQL]] | ||
Revision as of 19:06, 29 October 2010
Remove old relay logs
MySQL servers running version 4.* have a bug (here's one, maybe there are others) which results in the relay logs not being deleted. Space will eventually fill up on /a/sqldata due to this bug. You can clear out the old logs by running the utility
reset-mysql-slave hostname-here
from fenari. This stops the slave, issues a RESET SLAVE command (which automatically tosses all old relay logs and opens a fresh one) and restarts the slave.
Remove old bin logs
Old bin logs also pile up in /a/sqldata. You can clear the old ones out by the mysql command
PURGE BINARY LOGS TO 'name-of-bin-log-file-here'
and this will remove all bin logs older than the specified file. It syncs up the index file for these logs as well.