0

in my /var/lib/awstats, awstats creates monthly .txt files (its database).

Once these files are created and I have my graphics created in Awstats, can I delete the old log files created by Apache? Those found, generally, in /var/www/logs/ (the combined log file)?

This file is getting huge and I want to get rid of it (close to 0.5 Gb).

Also, what happens if I delete .txt files in /var/lib/awstats, do I loose this data?

Thanks

fizzy drink
  • 375
  • 4
  • 8
  • 22

1 Answers1

1

Sure, once awstats has finished processing your log files, you can delete them. Of course then you won't be able to go back and look at them for anything else, such as intrusion detection. Or if you were later adding other metrics to awstats, you wouldn't be able to calculate them on the period covered by the deleted logs, since it would have to go back through and reprocess them to do that.

But yes, it's standard practice to regularly rotate log files, and delete the oldest ones. How long to keep them depends on your installation. A log rotation tool such as logrotate can automate the process.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47