Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Backup Apache log files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Backup Apache log files
Authored by: simonboyle on Aug 03, '02 11:09:09AM

It's generally not a good idea to have automated scripts running/owned by by root unless you really have to, especially on a machine that you're exposing to the net. Change permissions on the directory to be writeable by a different user, who doesn't have permission to do much, and run the script as that. The filenames output by rotatelogs are the filename supplied with a time/date stamp in unix epoch format. From managing servers for a while, I found rotating daily/weekly is preferable to monthly, as you can miss occasional corruption if you let it go too long, and most stats packages are as happy working on collections of files as individual files, and you can write a script to compress the inactive files with gzip/perform backups on yesterdays files. Crucially, there's no need to interrupt the server if it's doing the rotation for you.



[ Reply to This | # ]