How to set up log storage for a long term in Plesk?

Question

The local laws of my country require storing all server logs for a long period. How do I set up storing of websites’ logs for years in Plesk?

Important

  • Plesk recommends you not to disable log rotation and not to store log files for a long period, because it may cause overuse of the disk space and affect the server performance.
  • Please note that when you remove a website, you remove its logs as well. To prevent that from happening, store required log files on a remote/external storage or a database. You can use third-party log management software or a bash script provided below.

Answer

To set up a non-standard period of log storage, do the following:

  1. To keep sensitive data safe, disable the IP addresses anonymization in Plesk. Go to Tools & Settings > Server Settings, clear the Anonymize IP addresses during log rotation and collecting of web statistics checkbox and click OK:
  2. Download and configure the actual version of archive-logs.sh script.

Question The local laws of my country require storing all server logs for a long period. How do I set up storing of websites’ logs for years in Plesk? Important Answer To set up a non-standard period of log storage, do the following:

Question The local laws of my country require storing all server logs for a long period. How do I set up storing of websites’ logs for years in Plesk? Important Answer To set up a non-standard period of log storage, do the following:

Leave a Reply

Your email address will not be published. Required fields are marked *