Author Topic: How to rotate access logs  (Read 2351 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to rotate access logs
« on: April 07, 2020, 10:46:02 AM »
I have just noticed that my hard drive has been running out of space. Checking what's bloating the drive, I've found out that one of the access logs has become 7 GB's, accumulating data for months.

Is there a way to clear these logs on a, say, monthly basis? That's what the rotate system does, right? How do I go about it? I have noticed that there is a Logrotate manager section in the CWP control panel but I don't know how to configure it. It'd be better if that page was designed more user friendly. It should be like configuring a backup, select which log to rotate, select interval (week/month etc) and hit Submit.

Re: How to rotate access logs
« Reply #1 on: April 07, 2020, 10:50:17 AM »
Very easy to do on the command line- especially if you read the docs/man pages! Come out of the Windoze/Mac buuble.  :o
/etc/logrotate.conf
/etc/logrotate.d/

Clue 1: compress
Clue 2: Size 2M

Re: How to rotate access logs
« Reply #2 on: April 07, 2020, 12:17:25 PM »
Scrub the above.
Just looked in both free CWP & CWP Pro: couldn't be easier! There's even a cut down man page alongside.
How much spoon feeding does one need? Jeez!