- Plesk for Linux
Logs are not being rotated on daily basis for a particular domain, e.g example.com.
Running logrotate utility fails with the following error:
# /usr/local/psa/logrotate/sbin/logrotate -v -f /usr/local/psa/etc/logrotate.conf
copying /var/www/vhosts/system/example.com/logs/error_log to /var/www/vhosts/system/example.com/logs/error_log.1
error: error creating output file /var/www/vhosts/system/example.com/logs/error_log.1: File exists
Temporary files were not removed due to unexpected interruption of logrotate.
Connect to the server via SSH.
Move the corrupted file
# mv /var/www/vhosts/system/example.com/logs/error_log.1 /root/
Note: If other files are mentioned in the error, e.g
/var/www/vhosts/system/example.com/logs/proxy_error_log.1, they also should be moved.