VPS Disk Space Growing ... ...

Discussion in 'Linux VPS/Dedicated - General' started by ppc, Sep 29, 2007.

  1. ppc

    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,
     
  2. Dan

    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.
     
  3. khiltd

    khiltd New Member

    Huh?

    Code:
    du /your/path/here | sort -nr
     
  4. ppc

    ppc Moderator

    Nope, I'm still on plesk

    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.
     
  5. khiltd

    khiltd New Member

    You don't have to. Run that once a week, piping the output to a file, and then diff them to see what changed.
     
  6. ppc

    ppc Moderator

    Sound advice. I'll try it out.
     
  7. mmxp

    mmxp New Member

    you may setup a crob job to update your log data once a week or at a short time.....
     
  8. ppc

    ppc Moderator

    I'd love to know how to do that in Plesk. As far as I know plesk does not have that capability....
     
  9. khiltd

    khiltd New Member

    Why do you need Plesk to setup a cron job?

    Code:
    crontab -e
     
  10. ppc

    ppc Moderator

    I dont need plesk to setup a cron job. I need plesk to rotate the logs.
     
  11. khiltd

    khiltd New Member

    I guess I misunderstood, but couldn't you still do that yourself?
     
  12. ppc

    ppc Moderator

    Should be able to. I need to research more on how plesk deals with logs.
     
  13. Dan

    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!
     
  14. cookie

    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:
     
  15. Dan

    Dan Moderator

    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
     

Share This Page