• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

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