How can I setup my RT so that the log files will be created on daily basis instead of appending to the same log file. The problem with appending the log in the same file is that the file is getting big and ends up consuming more space.
I need to create the file the log file on daily basis and after that I will create a cron job which will remove 10 days older files. Please help me to create the log files which will be created daily.
Take a look at the man pages for ‘logrotate’ and ‘logrotate.conf’. You can set things up to rotate them daily or weekly, keep ‘N’ copies, compress old ones, etc. Newer systems use the directory /etc/logrotate.d to store individual recipes in, so you also have a set of examples.
I have the below configuration in SiteConfig.pm file.
Set($LogToSyslog, ‘’);
Set($LogToFile, ‘info’);
What does it mean by Are you sure you really want those log files active all the time? As everyday logging is been done in one file , it is getting big, so I need to create the log file daily and create a cron job whilch will run daily and delete the old log file.
Please guide how can I achieve that, is there any problem in doing this.
But Actually I need the log, so that if what happens I should be able to know. But instead of appending the same file , I just need to create them daily
I mean to say the postrotate script here have a httpd reload over there.
Is httpd reload is necessary? Can it possible to do without httpd reload?
Have one doubt what is the difference between httpdreload, create and copytruncate? The three looks the same.
I think if we will remove these post rotate scripts, then the new file is being created but it is still updating the old file and size if new file remains 0kb until we reload the apache
When I am rotating using my command inside /etc/logrotate.d(rt is my created file).
logrotate - f rt
it is creating the new file.
But it is not being executed automatically within cron.daily. Could you please help??
Is the cron.daily not executed from anacrontab. I could see there is a entry in anacrontab to run cron.daily and I get regular mails that anacrontab is being successfully executed and in /var/spool/anacron I could see that todays datestamp is being updated.