View previous topic :: View next topic |
Author |
Message |
woodi2259 n00b
Joined: 21 Oct 2003 Posts: 35
|
Posted: Tue Nov 07, 2006 4:15 am Post subject: What can I delete from var |
|
|
I have my var directory on it's own partition which it has apparently filled up. Now nothing wants to run because it can't write to var. I'm not sure what in there is taking up 2 gigs but I have a feeling I can get rid of some of whats in there. So what can I get rid of so my system will run right again? |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Tue Nov 07, 2006 4:25 am Post subject: |
|
|
Everything in /var/tmp/portage.
Old big logfiles in /var/log |
|
Back to top |
|
|
woodi2259 n00b
Joined: 21 Oct 2003 Posts: 35
|
Posted: Tue Nov 07, 2006 4:33 am Post subject: |
|
|
Just was looking around more...looks like almost all the space is being taken up by some huge files in /var/lib/mysql/
all following the format leonardo-bin.0000* where * is a different number every time. Leonardo is my computers name...can I delete these files? Or will that break something |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Tue Nov 07, 2006 7:54 am Post subject: |
|
|
Those are the MySQL binary logs, which it needs (for example) in case of recovery. You should not remove those manually. Instead you should use MySQL commands for that and just in case always have some kind of backlog available.
For example, if you want to remove all the binary log entries except the ones which are created during last 20 hours, you would
Code: | PURGE MASTER LOGS BEFORE NOW() - INTERVAL 20 HOUR; |
in the MySQL shell. You might want to automate that via cron by putting the code above to some file and then your cron entry would run
Code: | mysql -u root < /path/to/your_sql_file.sql |
_________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
|
|