Logs are no longer rotated properly on some subscriptions

Refers to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk

Created:

2016-11-16 12:46:40 UTC

Modified:

2016-12-21 19:11:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Logs are no longer rotated properly on some subscriptions

Symptoms

Logs are not being rotated for several days for some subscription\domain.

Configuration files for logrotate are missing from ' /usr/local/psa/etc/logrotate.d ', however they are present for new domains so KB#213945865 doesn't help.

Cause

Logrotate config is missing after upgrade from the version that was affected by issue described in KB#213945865 , or config files were removed manually.

Resolution

The following script could be used in order to fix the issue for all the domains at once:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -Ne"select d.name from domains d join dom_param dp on d.id=dp.dom_id join log_rotation lr on dp.val=lr.id where dp.param='logrotation_id' and lr.turned_on='true';"|while read d;do /usr/local/psa/bin/domain -u $d -log-rotate true;done

This will recreate configuration files for logrotate for all domains that have rotation configured.

Related articles

KB#213373009 : log rotation by size is enabled, however log file sizes are far bigger then configured.

Have more questions? Submit a request
Please sign in to leave a comment.