* Robert Ames ([EMAIL PROTECTED]) [030609 11:30]:
> I've tried to find some good reference documentation on
> logrotate.conf files, but couldn't find anything solid.  The
> links that I've found are attached below [1].
> 
> Basically, I have some processes that dump data to
> /var/log/something/YYYY-MM-dd/*  ... these are all reasonably
> complicated sub-trees within each day's folder, but basically,
> I'm trying to use logrotate to rotate / delete the folders in
> bulk, and I don't even know that it's possible (and
> documentation isn't 100%, from what I could tell).

Since you already have them in YYYY-MM-dd subdirectories, I'd leave
logrotate out of the picture.  These don't need to be rotated in any
sense of the word, just the old ones need to be purged.  Just have a
nightly cron job that removes all but the most recent 14 directories, and
also (if you like) compresses all but the most recent 4 (of course,
substitute your own numbers for 14 and 4).

I think you're on the right track.  Also, I'd advise that any script
being run non-interactively that contains the words 'rm -rf' be run as a
non-root user.  Make the log files owned by some other user and have the
script run as that user.  That way there's no possibility of it
accidentally deleting too much.

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
http://www.aclu.org/            It's all about Freedom.

Attachment: signature.asc
Description: Digital signature

Reply via email to