Applicable to:
- Plesk for Linux
Symptoms
-
Logs are not being rotated for several days for some subscriptions/domains.
- Log rotation is performed normally for new domains.
Cause
Configuration files for logrotate are missing from /usr/local/psa/etc/logrotate.d
Resolution
-
Connect to the server via SSH
-
Recreate all the Logrotate configuration files for all domains with log rotation enabled:
# 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
Note: If the solution from the article Logs are not being rotated for a domain in Plesk that was applied before this article, the
/usr/local/psa/var/logrotate.status
file will contain incorrect data. Recreate it as described in Logs are not being rotated for a domain in Plesk
Comments
0 comments
Please sign in to leave a comment.