• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved Setting logroate_period via CLI does not work

Jens Johansson

Basic Pleskian
Server operating system version
Plesk Obsidian 18.0.80
Plesk version and microupdate number
6
I used the Plesk settings cli utility to change the logrotate period of a bunch of servers with this command
Bash:
plesk bin settings -s logrotate_force=true; plesk bin settings -s logrotate_period=30
The Output I got was two times "Parameter was saved." But when I checked the conf files in /etc/logrotate.d/ they were unchanged and still had the old value of 7 days for rotation. Then I waited a couple of days because I thought may be there is a maintenance task the checks the new value and updates the configs accordingly. But the stetting in the confs is still wrong. In the Plesk Interface under Tool & Settings it shows the new value of 30 days and if I apply the settings there, then the configs under /etc/logrotate.d/ get changed immediately. Is this a bug or am I missing something to apply the changes via CLI?
 
Looks like there is a gap. Could you try these workarounds?
  • Apply in UI (Tools & Settings), or via GraphQL updateServerSettings mutation - that fires the task.
  • Direct util (system logs only, per-domain/plan not touched):/usr/local/psa/admin/sbin/logrot_mng --system-logs --period-type=by_time --period=daily --rot-count=30
  • Per-domain via CLI: plesk bin domain -u <domain> --log-bytime daily --log-max-num-files 30
 
Thank you, @Daniil Romanov, /usr/local/psa/admin/sbin/logrot_mng --system-logs --period-type=by_time --period=daily --rot-count=30 does the trick for system logs. That is all I was after. The logs of the domains I did separately with a for loop and the per-domain command you mentioned.
 
Back
Top