[Cialug] Logrotage for keeping archived backups

Matthew Nuzum newz at bearfruit.org
Wed Oct 9 19:57:19 CDT 2013


Meh, I went the cheap way out:

find logs/ -mtime +7 | grep -v 28 | xargs rm

It's not the *last* day of the month, but it will work. ;-)

On Oct 9, 2013, at 7:47 PM, Matthew Nuzum <newz at bearfruit.org> wrote:

> I would like a backup retention policy that keeps the last 7 days of a log file plus the last one of each month. Has anyone seen a log rotate config that does this?
> 
> Or maybe a shell script that is already made?
> -- 
> Matthew Nuzum
> newz2000 on freenode, skype, linkedin and twitter
> 
> ♫ You're never fully dressed without a smile! ♫
> 
> 

-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin and twitter

♫ You're never fully dressed without a smile! ♫




More information about the Cialug mailing list