Backing up Raw Visitor Access Logs and domains.


I would like a little help please. I know I may have asked this before but I am a little confused on how to accomplish this as I am new to all on this. I am used to using Cpanel where this task is as simple as checkmarking 2 boxes and clicking save. I have installed Virtualmin and I am pleaed to say that I am very happy on how it is working. I am slowly getting used to how it functions but it is different to use than cpanel but has most of the features that I require that cpanel provided.

An important part of the hosting control panel in my case is the backing up of raw visitor access logs. I would like to know please how can this be accomplished? Would I backup the files in var/logs/http or would I backup the logs in var/logs/virtualmin? Also how would I just backup the access logs files and not the error logs files.

What I would like to do is to have 6 weeks of logs backed up at anyone time so they rotate with the oldest being deleted and replaced with the newest.

A second question also please is there a way to remove everything like awstats ets and all the folders when a addon domain is added to the virtual server accounts and just leave thos folders for the main domain account. For example folders for then no folders for and etc. The only folder I would like to keep is the cgi-bin folder for the addon domain.

Thank you kindly in advance for your help.

Could anyone please provide a little assistance to my problem please. I just would like to know how I would backup my access logs as it is important as the affiliate program I am with requires you to backup you access logs just incase they require a audit.

I would like to know please how do I just backup the raw visitor access logs and not the error logs. do I backup from the folder var/log/http or var/log/virtualmin?

This is the only thing now holding me back from using my VPS with Virtualmin.

Any advice would be most helpful.



Since it sounds like you don’t just want the logs backed up, but that you want rotation and such handled for you – the easiest way to do that would likely just be to change the logrotation schedule to keep the Apache log files for longer.

This works for both the access and error logs, rather than just the access logs – but to do that, you could perform the following two steps:

First, edit /etc/logrotate.conf, look for all the entries that say “rotate 5”, and change them to “rotate 42” (for 6 weeks). That will change things for existing domains.

Second, go into Webmin -> System -> Log File Rotation -> Edit Global Options, and in there set “Number of old logs to keep” to “42”. This setting will affect newly created domains.


Thank you Eric for your kind help and support it is very much appreciated. I am enjoying using virtualmin and I am finding new features each time I use it (also with help from this great support forum :wink: ) For a free open source control panel virtualmin is the best.

Thanks for your help Eric.