VPS Disk Space Growing ... ...

ppc

Moderator
Hi all,

I noticed over the past few months that my overall disk space has increased in my VPS. I know for a fact that i havent been installing anything nor changing anything around really. Its grown at least half a gig in a month or 2. (Its not e-mail as I dont use my VPSes email server)

Any ideas what it could be? Log files?

I know you can run "du" but its not really useful in showing which directories or files exactly are growing or taking up an enormous amount of space.

Any help would be appreciated.

Regards,
 

Dan

Moderator
Howdy Josh,

You're still on DA? I'm no help with that unfortunately but check for DA and server update files.

About log files, absolutely yes this could be it. Make sure that they're being zipped, rolled over, and only kept for so long.
 

ppc

Moderator
You're still on DA? I'm no help with that unfortunately but check for DA and server update files.
Nope, I'm still on plesk

About log files, absolutely yes this could be it. Make sure that they're being zipped, rolled over, and only kept for so long.
Any one know how to configure such retention functions in plesk?

khiltd,

I think I was a bit out of my mind when I wrote that. Thanks for setting me straight. Question remains though is what exactly is growing day by day. I don't really feel like marking down the file sizes of every single directory and checking to see what is growing.
 

khiltd

New Member
[Question remains though is what exactly is growing day by day. I don't really feel like marking down the file sizes of every single directory and checking to see what is growing.
You don't have to. Run that once a week, piping the output to a file, and then diff them to see what changed.
 

Dan

Moderator
Hello Josh,

The program you need to be looking at is logrotate. Normally it's preinstalled just do 'which logrotate' to be sure.

After that you want to look in /etc/logrotate.d for the files that tell logrotate what to rotate and what to do with them. There are simple script files in there that logrotate reads such as this one for apf
Code:
/var/log/apfados_log /var/log/apf_log {
    missingok
    compress
    postrotate
    endscript
}
And here is what I have for apache logs as well which I show because it shows how wildcards can be used
Code:
/usr/local/apache/logs/*log {
    missingok
    notifempty
    sharedscripts
    compress
    postrotate
        /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
The apache one was automatically generated whether by Cpanel, apache, or logrotate I am unsure.

You'll find the config file for log rotate at /etc/logrotate.conf with options like how often to run and how long to keep rotated logs.

Hope that helps!
 

cookie

Alien
Every thing is complicated, I have the same problem and am very frustrated about this at least in share hosting I did not have this problem
well if this goes on I will soon be broke and have to give up:mad:
 

Dan

Moderator
Every thing is complicated, I have the same problem and am very frustrated about this at least in share hosting I did not have this problem
well if this goes on I will soon be broke and have to give up:mad:
Internetbrother,

Here is a post regarding Cpanel update files which are safe to remove. If you have upgraded to CPanel 11 and Apache 2 then these updates can weigh in at a couple hundred megs.

Hope that helps
 
Top