1834018 Members
2008 Online
110063 Solutions
New Discussion

logrotate question

 
Rick Garland
Honored Contributor

logrotate question

Hi all:

For a certain set of apps, I make a tar ball that is then backed up to tape. The tar balls I make are stored on disk with the $DATE as part of the file name.

Since the files are named differently each day the logrotate just keeps renaming them 'myapp.20061001.tgz.1 myapp.20061002.tgz.1.1 myapp.20061003.tgz.1.1.1 myapp.20061004.tgz.1.1.1.1 etc.'

Here is the logrotate stanza;
/home/backup/myapp* {
rotate 8
daily
mail me@work.com
}


Or, am I going to run through a script that is checking the dates?

Thanks
3 REPLIES 3
Jeff_Traigle
Honored Contributor

Re: logrotate question

You'll be processing those yourself separately, I think. Logrotate is intended for rotating logs that will have and will retain the same name over time.
--
Jeff Traigle
Geoff Wild
Honored Contributor

Re: logrotate question

Yes - logrotate expects to see the same filename.

So, if you want logrotate - then get rid of the $DATE in the tarball.

Change to say something like myapp.dailey.tgz

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: logrotate question

That's what I thought - just wanted to double check

Thanks folks!