Author Topic: Logrotate configuration not working  (Read 1486 times)

0 Members and 1 Guest are viewing this topic.

Offline
**
Logrotate configuration not working
« on: December 06, 2023, 04:07:37 PM »
I created the config but when I run it, I get: No such file or directory at every line.

My logs are getting huge. Please advise.
You may use our FREE SMTP Newsletter APP at https://www.emailbat.com

Offline
****
Re: Logrotate configuration not working
« Reply #1 on: December 06, 2023, 09:36:18 PM »
You have to put the full path to the log files in the logrotate config.  Please post the contents of that file...
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: Logrotate configuration not working
« Reply #2 on: December 07, 2023, 07:13:41 AM »
I created that file:
Code: [Select]
# Logrotate CWP
/usr/local/apache/domlogs/*.log {
        compress
        delaycompress
        daily
        missingok
}
/usr/local/apache/logs/*.log {
        compress
        delaycompress
        daily
        missingok
}
You may use our FREE SMTP Newsletter APP at https://www.emailbat.com

Offline
*****
Re: Logrotate configuration not working
« Reply #3 on: December 07, 2023, 02:23:43 PM »
Did you create the file manually via a shell or did you use the CWP built-in facility?
https://fornex.com/en/help/logrotate-centos-7/

Offline
****
Re: Logrotate configuration not working
« Reply #4 on: December 07, 2023, 07:51:47 PM »
Your missing the very important part.  You need a "rotate" option for how many files to keep.  Add " rotate 1 " as an option and it might work.
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: Logrotate configuration not working
« Reply #5 on: December 18, 2023, 04:15:45 PM »
I understand nothing. I ask for paid support for a) Updates and b) log space cleaning. I think CWP will need to improve to that.
You may use our FREE SMTP Newsletter APP at https://www.emailbat.com

Offline
****
Re: Logrotate configuration not working
« Reply #6 on: December 18, 2023, 09:26:21 PM »
Change your files to:

Code: [Select]
# Logrotate CWP
/usr/local/apache/domlogs/*.log {
        compress
        delaycompress
        daily
        missingok
        rotate 1
}
/usr/local/apache/logs/*.log {
        compress
        delaycompress
        daily
        missingok
        rotate 1
}
Google Hangouts:  rcschaff82@gmail.com

Offline
**
Re: Logrotate configuration not working
« Reply #7 on: December 19, 2023, 06:37:03 PM »
Is that official please? Have you tried that? Thanks for the help.
You may use our FREE SMTP Newsletter APP at https://www.emailbat.com

Offline
****
Re: Logrotate configuration not working
« Reply #8 on: December 19, 2023, 07:28:35 PM »
Try it and find out if it works.  But I know that if logrotate doesn't have a number of backups to keep, it will fail.  Hence why all that was added is "rotate 1", which tells it to keep ONLY 1 backup.  If you need more days, increase that number.
Google Hangouts:  rcschaff82@gmail.com