Results 1 to 2 of 2
I have a problem where logrotate wont remove old rotated files. I've googled and googled and believe i have everything set up correctly .. /etc/logrotate.conf # rotate log files weekly ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-27-2012 #1
- Join Date
- Jul 2010
Logrotate - not removing old files - driving me insane !
# rotate log files weekly
# keep 4 rotated files
# use date as a suffix of the rotated file
# uncomment this if you want your log files compressed
# compression scheme
I would expect /etc/logrotate.d/ora_alert to run daily and remove any rotated files older than 28 days (maxage 2, but I still have rotated files from January 11th (today is 27th April). It does gzip log files every day, but isn't removing any.
I am thinking maybe I have to manually remove any rotated files from before I made the maxage change to the logrotate config file ?
Many thanks in advance
- 04-28-2012 #2
- Join Date
- Nov 2007
- San Diego
Sometimes it helps to run logrotate -d, or -f to make sure everything is working properly.
logrotate -f /etc/logrotate.d/ora_alert
Then check the contents of the files to see if they are overwritten with new files, and if the date changes.