Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What can I delete from var
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
woodi2259
n00b
n00b


Joined: 21 Oct 2003
Posts: 35

PostPosted: Tue Nov 07, 2006 4:15 am    Post subject: What can I delete from var Reply with quote

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
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Tue Nov 07, 2006 4:25 am    Post subject: Reply with quote

Everything in /var/tmp/portage.
Old big logfiles in /var/log
Back to top
View user's profile Send private message
woodi2259
n00b
n00b


Joined: 21 Oct 2003
Posts: 35

PostPosted: Tue Nov 07, 2006 4:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Tue Nov 07, 2006 7:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum