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

jhbball

Platinum Member
Mar 20, 2002
2,917
23
81
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

Elite Member
Sep 14, 2001
30,672
0
0
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

Diamond Member
Jul 14, 2000
4,259
0
0
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

Senior member
Aug 26, 2002
306
0
0
www.khyrolabs.com
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.