• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Log rotate - faulty file generation

klockstone

New Pleskian
One domain (of 9 on my VPS) is faulty:

# cat /usr/local/psa/etc/logrotate.d/mydomain.com

shows:

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
/var/www/vhosts/system/mydomain.com/logs/*.processed {
etc ...

So I edited it as no other option was available.
1. In practice what does that warning mean?
2. When does automatic generation occur?
3. Can I trigger automatic generation from the plesk console?

Thanks,

Keith.
 
Hi Igor,

Yes I have read it.

Before my first posting, I did the following:

1. I changed the log rotate settings back and forth and clicked OK.

2. I tried cloning the profile and changing the site to use that profile.

3. I tried rebooting the server.

Non of the above had any effect on the files in /usr/local/psa/etc/logrotate.d -
which is why I built my own /usr/local/psa/etc/logrotate.d/mydomain.com
for that site.

What else could I do?

So getting back to my original questions - what are the side effects of
what I have done?

Keith.
 
In the absence of any help whatsoever from support staff I have come up with a solution which is a dirty fix. I have written a php script that is triggered every 15 minutes that copies all the files in:
/var/www/vhosts/system/mysite.com/logs/
to:
/var/www/vhosts/mysite.com/newlogs/
where I have FTP access.

Also, I monitor the files in:
/usr/local/psa/etc/logrotate.d/
and email myself if there are any changes. Having changed one of the files to get the correct log rotation and with the lack of answers to my questions, I deemed this to be necessary.

If anyone would like a copy of this script, please make contact.

Cheers,

Keith Lockstone,
[email protected]
 
Back
Top