이 녀석이 어떤 녀석인지 알고 싶습니다

cshong의 이미지

주기적으로 로그파일을 정리해주는데도 계속해서 시스템의 사용량이 점점 올라가는 것이 였습니다.

그래서 뒤짐한 결과 /var/lib/mysql 디렉토리에 사용자와 소유자가 mysql이며 2006년부터 매주 수요일, 일요일 같은 시각에 xxxxx-bin.001부터 xxxxx-bin.216까지 파일이들 만들어지고 있는 것을 확인 할 수 있었습니다.

xxxxx-bin.index 파일도 함께 계속해서 업데이트 되고 있었습니다.

이 것들은 파일 하나에 5~7MB 정도 되니 모두 합치면 1GB가 넘어서는 용량이더군요.

어떤 파일들인지 몰라 지우지도 못해 2008년 1월 1일을 기준으로 그 전 파일들을 백업해 놓고 삭제해둔 상태에서 이렇게 글을 올립니다.

cat 명령으로 확인해보니 xxxxx-bin.index 파일은 xxxxx-bin001부터 xxxxx-bin216까지 파일명으로 이루어져 있었습니다.

아.. 그리고 수요일, 일요일 같은 시각이라는 점에서 크론을 생각나서 봤더니(사실 잘 모릅니다 ㅠ-ㅠ)

매주 일요일에 실행되는 디렉토리의 파일과 내용은
(22 4 * * 0 root run-parts /etc/cron.weekly)

1. 0anacron
anacron -u cron.weekly

2. makewhatis.cron
LOCKFILE=/var/lock/makewhatis.lock

[ -f $LOCKFILE ] && exit 0
trap "rm -f $LOCKFILE" EXIT
touch $LOCKFILE
makewhatis -w
exit 0

3. reboot
rm -f /var/log/maillog
rm -f /var/log/messages

cp /var/log/maillog_org /var/log/maillog
cp /var/log/messages_org /var/log/messages

reboot

였으며, 매주 수요일에 실행되 디렉토리의 파일과 내용은
(00 5 * * 3 root run-parts /etc/cron.weekly2)

reboot
maillog, messages
rm -f /var/log/maillog
rm -f /var/log/messages

cp /var/log/maillog_org /var/log/maillog
cp /var/log/messages_org /var/log/messages

reboot

였습니다.

cshong의 이미지

방금 확인해보니 마지막 파일인 xxxxx-bin216이 실시간으로 계속해서 파일크기가 증가하는 것을 확인 할 수 있었습니다.

이녀석들 삭제해도 되는걸까요?

제발~ 알려주세요~ ㅠ ㅠ

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

7339989b62a014c4ce6e31b3540bc7b5f06455024f22753f6235c935e8e5의 이미지

http://forums.cacti.net/post-76692.html

구글에서 mysql bin001로 검색하니 첫 페이지에 나오네요.

znfznfzz의 이미지

해당 파일은 mysql 로그파일인데..
이전파일들은 삭제하셔도 무방하실것같구요..
무언가 계속 insert를 하는것 같은데..
strings 해당파일로 로그를 확인해보세요..
굳이 로그를 남길 이유가 없으면 /etc/my.cnf에서 log-bin 라인을 주석처리하면 되는걸로 알고있습니다.

panda005의 이미지

참고로 log-bin은
mysql에서 replication 맺을 때
마스터에서 슬레이브로 이거해라 저거해라 로그를 순차적으로 남기는 파일입니다.

리플리케이션 맺을 일 없으시면 필요없으니까
지워버리고 위에 znfznfzz님이 말씀하신 것처럼 log-bin을 주석처리하면 됩니다.

간혹, my.cnf 파일을 mysql_data_dir에서 참조하도록 설정되어 있기도 합니다.

cshong의 이미지

답변 감사드립니다. ^^

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

================================
생각만 해서는 아무것도 이룰 수 없다.. 행동하라!!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.