• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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