• 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

Question where is "Force daily log rotation for all domains" in CLI?

agarzon

Basic Pleskian
According the change-log, starting from Plesk Onyx 17.5.3 Update 60 it was introduced and I quote:
Plesk administrators can now make log rotation mandatory for all hosted domains by enabling the “Force daily log rotation for all domains” option in “Tools & Settings” > “Server Settings”, and also via CLI and API. In addition, Backup Manager logs are now rotated in accordance with the global log rotation policy.

According that statement that new option can be managed via CLI and API.

However, after reviewing the Command-Line documentation for hours and checking the --help option in my own command line, I cannot find that new option in the CLI.

Notice that there are "rotate" settings for sites, plans and subscriptions, but those has been there since long ago and they are a different thing than the new introduced: force rotation.

Thank you for any help.
 
Check output of

# /usr/local/psa/admin/sbin/logrot_mng --help

When you tick this option in UI, following command runs:

logrot_mng --system-logs --period-type=by_time --period=daily --rot-count=60
 
Also there are commands like

plesk bin settings --set logrotate_force=true
plesk bin settings --set logrotate_period=123

But seems there is something wrong and they are not working as expected. We will submit the corresponding bugreport.
 
@agarzon have you tried to enable logs rotation enforcement via Panel UI "Tools and Setttings->Server Settings"?
 
Also there are commands like

plesk bin settings --set logrotate_force=true
plesk bin settings --set logrotate_period=123

But seems there is something wrong and they are not working as expected. We will submit the corresponding bugreport.

This command looks the closest one, although this is not mentioned in the documentation. Looking forward to get this working. Thank you.

@agarzon have you tried to enable logs rotation enforcement via Panel UI "Tools and Setttings->Server Settings"?

The problem is not about being unable to enable it, the problem is that I need to execute that from CLI and not from GUI (I use ansible to deploy servers)
 
Also there are commands like

plesk bin settings --set logrotate_force=true
plesk bin settings --set logrotate_period=123

But seems there is something wrong and they are not working as expected. We will submit the corresponding bugreport.
Check the position of 'endscript'.
Inside some of scripts it has been set in front of other entries (I think so).
/etc/logrotade.d
 
Back
Top