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!

Archive domlogs when rotating them instead of deleting them… is there a hook to do this ?

Discussion in 'cPanel Developers' started by monarobase, Jun 17, 2013.

  1. monarobase

    monarobase Well-Known Member

    Jan 26, 2010
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    We have a legal requirement to keep a backup of logs for 365 days and I'm trying to set up a rotation system that would prevent logs from being lossed and without loosing any lines or filling up all the usr partition.

    When cPanel updates the stats with /scripts/runweblogs it creates a tempory file, runs the stats on it, then deletes it.

    Is there a hook or some way I can get a copy of the log tempory file before it's deleted ?

    At the moment I update the stats with a script I run daily with cron, running /scripts/runweblogs username for each user once I've backed up his logs. I'm looking to improve this method so I don't loose any log entries in between backing up and running /scripts/runweblogs

    Do you have an idea of how I could get this done ?
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    There are several options that may interest you under the "Stats and Logs" tab in "WHM Home » Server Configuration » Tweak Settings". In particular, these two options are relevant:

    "Delete each domain’s access logs after stats run"
    "Keep monthly log files"

    Thank you.
    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