There's a way to do this?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
In your logrotate.conf (or the equivilent logrotate.d file), change the line that says "
(your number may be different) to a bigger number. That will tell it to keep that many days of logs. You can make it 36500, which would last you 100 years. |
|||
|
|
|
Setting aside the point that rotation involves deletion... ;-) It looks like you can simply add the word 'copy' to the appropriate file (likely in /etc/logrotate.d). For example, an apache2 logrotate script would look like this:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
copy
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
/etc/init.d/apache2 reload > /dev/null
fi
endscript
}
Try that, and see if it does what you want. |
|||||||||||
|