I've got two separate logrotates I'd like to run, one for Tomcat and one for Apache, but I'd like to run the Tomcat one daily and the Apache one weekly. Now, the logrotate itself is working fine, but although I have 'daily' in Tomcat, and 'weekly' in the Apache one, the latter is rotating everynight rather than weekly.
I have added logrotate from cron.daily into cron.weekly but it's not had an affect, is there a step that I have missed ?
Here is my Tomcat one:
And my Apache one
Does anyone have any ideas where I've went wrong ? It's driving me insane!!!
Hi, have you checked for the contents of /etc/logrotate.conf and the contents of files in /etc/logrotate.d/ ?
It may be that some of those configuration files already contains specifications for the apache logs (tose in /var/log/httpd) that override the 'weekly' setting in your custom apache logrotate configuration file.
Yeah, the contents of /etc/logrotate.conf is as default and have never been changed. I've been through all the separate configuration files in /etc/logrotate.d and none of them have anything related to Apache contained in them.
I've tried it with and without the 'weekly' setting in the Apache config file as logrotate.conf has weekly as it's default setting but it hasn't made any difference!
Totally confused with this one. I also tried it with the logrotate config file for cron.daily inside cron.weekly too, but that made no difference either.
Hi All
I have created a file in /etc/cron.daily on redhat linux 7.3 version host
called applicationscript
cat applictaionscript
#!/bin/bash
/prod/data/routine.sh
cat /prod/data/routine.sh
#!/bin/bash
#details
regular=/prod/data/jboss/logs
backup=/prod/data/logs
#echo "Moving logs"... (3 Replies)
Hi Everyone,
We are trying to do a logrotate for "catalina.out" daily, So have used the "copytruncate" option in the logrotate configuration but ended up seeing there was a 0kb file touched with "catalina.out" and the other file with the current date(compressed) file created and seems the log is... (2 Replies)
I need to create a cron job that will run daily to change permissions to a particular folder to 666 every 24hrs.
I have no experience with crontab or cron jobs at all so if someone can guide me through this it would be a great help.
The folder's example is 'www/test/htdocs'
Also if you... (3 Replies)
I have run into a problem where about a dozen machines, all the same x86_64 2.6.12 GNU/Linux. For some reason these machines will fill up their /var partition (10G), because their logs never get rotated... Unfortunately, there is no error message from logrotate (would be in /var/log/messages) and... (8 Replies)
Hi,
I am using logrotate 3.7.4-13
-When i specify both "size" and "daily/weekly/monthly" , the logs are being rotated only based on size and the period is not being considered.
-When i just specify "daily/weekly/monthly" (with no size parameter), the logs are being rotated accordingly.
... (2 Replies)