Logs are not being rotated for domain

Created:

2016-11-16 12:41:32 UTC

Modified:

2017-04-24 11:18:35 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Logs are not being rotated for domain

Applicable to:

  • Plesk for Linux

Symptoms

Logs are not being rotated for domain example.com .

Cause

The '/usr/local/psa/var/logrotate.status' file got corrupted.

That file is where logrotate stores information about when it last rotated each log file.

Resolution

  1. Move '/usr/local/psa/var/logrotate.status' file and run daily maintenance:

    mv /usr/local/psa/var/logrotate.status /usr/local/psa/var/logrotate.status_old /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php

Logrotate task for one domain:

/usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.d/example.com

2.Check if proper 'logrotate.status' is created:

less /usr/local/psa/var/logrotate.status | grep example.com
"/var/www/vhosts/system/example.com/logs/access_log.processed" 2014-10-13
"/var/www/vhosts/system/example.com/logs/xferlog_regular.processed" 2014-10-13
"/var/www/vhosts/system/example.com/logs/error_log" 2014-10-13
"/var/www/vhosts/system/example.com/logs/access_ssl_log.processed" 2014-10-13
Have more questions? Submit a request
Please sign in to leave a comment.