PDA

View Full Version : Nub help: Backing up & Rotating Apache Log files: linux server


jhbball
04-04-2008, 10:35 AM
So, I'd like to set up a cron job, that rotates and backs up Apache log files on our web server, but I'm not sure how to set this up. Does anyone have quick instructions as to how to set this up?

-----------
Moved to appropriate forum.

Markbnj - Programming Mod

Nothinman
04-04-2008, 01:14 PM
Most Linux distributions already have a facility called logrotate. If you change the paths where Apache logs you'll have to fix them in logrotate but that's about it.

Brazen
04-04-2008, 02:10 PM
Originally posted by: jhbball
So, I'd like to set up a cron job, that rotates and backs up Apache log files on our web server, but I'm not sure how to set this up. Does anyone have quick instructions as to how to set this up?

-----------
Moved to appropriate forum.

Markbnj - Programming Mod

If you installed Apache from a package manager, then logrotate should already be set up. You can open "/etc/logrotate.conf" and add the line: "mail youremail@server.com" to have logrotate email the logs to you. You can also configure logrotate to copy the logs files to a specified location.

Just google "logrotate" or "man logrotate" for more information.

Khyron320
04-05-2008, 12:23 AM
Install webmin and use its management tool for syslogs. Very easy and very quick when you are asked to change a setting. You wont have to fumble around much looking for an answer.