Symptoms
- Errors similar to the following are logged while running regular scheduled backups in Plesk:
CONFIG_TEXT: Warning: Extension "Git"
Unable to back up extension. Error: Failed to exec backup_restore_helper: Exit code: 3: [2023-02-28 01:10:13.064] 2666812:63fd46650f799 ERR [panel] Can't open custom log file: /var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/backup.log
PHP Warning: fopen(/var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/profile.log): Failed to open stream: No such file or directory; File: /usr/local/psa/admin/plib/backup/Agent/Profiling/File.php, Line: 26 PHP Warning: fopen(/var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/profile.log): Failed to open stream: No such file or directory in /usr/local/psa/admin/plib/backup/Agent/Profiling/File.php on line 26
[2023-02-28 01:10:13.285] 2666812:63fd46650f799 ERR [panel] Unable to open the log file '/var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/profile.log', cancel profile logging: Failed to open the profiling log file: fopen(/var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/profile.log): Failed to open stream: No such file or directory
PHP Warning: touch(): Unable to create file /var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/backup.log because No such file or directory; File: /usr/local/psa/admin/plib/Plesk/Log/Writer/File.php, Line: 9 PHP Warning: chown(): No such file or directory in /usr/local/psa/admin/plib/Plesk/Log/Writer/File.php on line 11
"/var/log/plesk/PMM/backup-2023-02-28-00-12-37-185/backup.log" cannot be opened with mode "a"
Cause
The MAX_NUMBER_OF_LOG_DIRS setting within the /usr/local/psa/admin/share/pmmcli/pmmcli-rc
file on the Plesk server is set to a number that is being reached while the backups are running. The log files are therefore being removed automatically, due to which the files related to them are not found and thus the mentioned errors are generated.
Resolution
In order to resolve the issue, you should follow these steps:
1. Log into your server via SSH as the root user
2. Open the /usr/local/psa/admin/share/pmmcli/pmmcli-rc
(RHEL-based OS) or /opt/psa/admin/share/pmmcli/pmmcli-rc
(Debian-based OS) file with your favorite command-line text editor
3. Locate the following line:
CONFIG_TEXT: # Max number of log dirs stored
MAX_NUMBER_OF_LOG_DIRS 30
4. Change the value to a much higher one (2048 for example)
5. Save the changes
Once this is done, you should wait for the scheduled backups to run again and the errors should not appear in the logs.
Comments
0 comments
Please sign in to leave a comment.