Logrotate Question
- From: Ian Lists <ian-list@xxxxxxxxxxxxxxxx>
- Date: Fri, 13 Jun 2008 14:12:44 +0000 (UTC)
I am trying to have logroate archive logs into a dynamic directory structure. I can 't seem to get the following logroate script to work and I don't know if it is really possible. It does not seem that the "olddir" option supports variables? Does anyone have any advice on how to get this completed.
This is the error I get.
error: /etc/logrotate.d/test:6 bad olddir path "/opt/`date +%Y/%m/%d`"
######################################################################
/opt/netlogs/live/*.log {
daily
prerotate
/bin/mkdir -p "/opt/`date +%Y/%m/%d`"
endscript
olddir "/opt/`date +%Y/%m/%d`"
sharedscripts
missingok
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
#########################################################################
Thanks
Ian
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Follow-Ups:
- Re: Logrotate Question
- From: obed
- Re: Logrotate Question
- From: Marcos Trazzini
- Re: Logrotate Question
- From: Daniel Carrillo
- Re: Logrotate Question
- From: Pat Riehecky
- Re: Logrotate Question
- Prev by Date: Re: *** glibc detected *** double free or corruption RedHat 4 AS
- Next by Date: Re: USB devices on RHES 5.1 not detected
- Previous by thread: *** glibc detected *** double free or corruption RedHat 4 AS
- Next by thread: Re: Logrotate Question
- Index(es):
Relevant Pages
|