hudsonloner

Registered
Aug 5, 2012
3
0
1
cPanel Access Level
Root Administrator
Hi,

I need to maintain atleast 3 months domlogs backup in my cpanel server. How can I do it in front end and back end. Any help very must appreciated.


Regards,
Hudson Loner
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Hudson,

The only way to do this with the retention you need would be to check "Off" in WHM > Tweak Settings for this option:

Delete each domain’s access logs after stats run

After that, you'd then have to back up the domlogs every 3 months and then clear the existing ones (don't remove the files, simply clear them).

The act of backing them up and clearing them could be done using a cron or a script.

Thanks!
 

hudsonloner

Registered
Aug 5, 2012
3
0
1
cPanel Access Level
Root Administrator
Hello,

Thank you for the update. Actually I need domlogs for 3 months with out depending on the log size but with frequency of rotation. Please let me know if there is any option or some sample script for this requirement. Any help is very much appreciated.

Regards,
Hudson Loner
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Hudson,

There is no option in cPanel or WHM frontend or backend to perform this task. You'll have to write something to do it.

I don't have an example script. If you want to save them for 3 months, you'd need to copy them to a backup. If you start writing the script and need help with it after going through that effort, please let us know.

Thanks!