Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cPanel noob, question about /statistics/logs

Discussion in 'General Discussion' started by srossnz, Aug 16, 2008.

  1. srossnz

    srossnz Registered

    Aug 16, 2008
    Likes Received:
    Trophy Points:

    I am trying to keep my backups as small as possible. I am assuming the cPanel automated backups include /statistics/logs files? If so I notice that I have some big ones:

    mainly: access_log.processed which is over 1gig

    then a series of zipped access logs such as:

    It looks like the zipped ones are created nightly on a rotation. Do I need these zipped ones for any reason? Is it ok to just delete them?

    As for the 1gig+ file can I do anything to keep this down? Like some sort of configuration to ensure they do not get over 200meg in size or auto zip after 200meg? I think my nightly backups might be an extra 1-2gigs because of these logs.

    Thanks for any advice and please keep in mind I'm not a linux guru so if you can give simple advice that would be great.
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Jan 24, 2005
    Likes Received:
    Trophy Points:
    Yes, zipped ones are created due to log rotation that Linux does it by default. If no rotation would occur on the various log files, then they will just grow bigger and bigger, filling up the space but most importantly making it very difficult to find any information that we might be looking for in those log files.

    Logrotate is the default application used to rotate all logs files. It allows automatic rotation, compression, removal of log files and each file can be handled daily, weekly, monthly or depending on the size (in your case it looks like the rotation is configured as per size).

    Normally, logrotate is run as a daily cron job and the script is /etc/cron.daily/logrotate. The configuration file of logrotate is /etc/logrotate.conf which explains everything in a simple manner. And various packages have their own configuration file under /etc/logrotate.d/ directory.

    In your case it looks like the log rotation is set to rotate 3 times. You can rotate the logs just twice by changing the 'rotate' option to 2 in /etc/logrotate.conf file.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice