• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question logrotate for logs in /var/log/plesk/PMM/

janpieterk

New Pleskian
Hello,

Plesk Obsidian on Ubuntu 16.04.
I am trying to configure the logrotate for the logs in /var/log/plesk/PMM/, which seems to be 14 days now. I would like to shorten this, since the logs take up a lot of disk space.
However, I can't find the location where I can configure this. There is some logrotate stuff in /usr/local/psa/etc, but nothing which refers to /var/log/plesk/PMM.
Can someone help?
Many thanks in advance.

Jan Pieter K.
 
/var/log/plesk/PMM/ directory contains backup and migration logs.

When Plesk starts performing a backup, it reports the progress to a log. Each backup log is located in a separate folder that contains the date and time of the backup in its name.

It is not necessary to rotate such logs as they can't grow to unwieldy size as much as Maillog for example.

The same applies to the migration logs as well.

Also, when the scheduled backup task is completed successfully, the corresponding log files are deleted automatically.
 
Well, the problem on our server is the migration logs. Two weeks worth of "migration.log.xxx" is something like 3 or 4 gigabytes and I find that a bit much. We had "disk full" problems because of that.

I don't think keeping two weeks of "migration logs" is necessary. I would like to adjust this "two weeks" timeframe to a few days at most, but I don't know where to configure that. Can anyone help here?

Additional question: I don't really understand these "migration logs". I don't know what they have to do with a "migration". They seem to contain information about backups of the sites on our system. This is not information we need. Is there some way to configure what is being logged in "migration.log"? Or can it be turned off completely?
 
There are different log levels for backups. You can try to remove highly verbose ("debug") logging by this:
# plesk db "DELETE FROM misc WHERE param='verbose_scheduled_backup_logs'"
but there will still be some logging.

As Igor said, these logs are not meant for rotation. If you think that you don't need them, you could create a cronjob that deletes the logs on a regular basis. However, in case that issues come up with a restore or backup, it will then not be possible to check what has happened during a backup that might have caused them.
 
Thanks for the advice. The param 'verbose_scheduled_backup_logs' wasn't there in the misc table, so the logs are not verbose.
What I did was create the following cronjob to be run every four days (0 0 */4 * *):

Bash:
find /var/log/plesk/PMM -maxdepth 1 -name "*.log.*" -mtime +3 -delete

So, only archived logs older than three days will be deleted. In the case of errors, that should give us enough time to check the log.
 
Back
Top