- Plesk for Windows
How to remove Plesk logs on a monthly basis automatically in Plesk for Windows based on the last modification date?
Plesk allows to configure log rotating for domains.
For rotation of Plesk logs stored in "%plesk_dir%\admin\logs" use Windows Task Scheduler:
- Connect to the server via RDP
- Download from the attachments zipped file removelogs.zip with an example of PowerShell script that removes logs older than 30 days and extract it for example in C:\ root directory - C:\removelogs.ps1
- Launch Windows Task Scheduler and add the task that will execute removelogs.ps1 on weekly/monthly basis:
The script searches for files older than 30 days in the folder with Plesk logs (default C:\Program Files (x86)\Plesk\admin\logs) and removes it. The info about removed files stored in 'C:\removed_log_files.log' file. The log file rotated when its size exceeds 10Mb
#213911325 Plesk for Windows service logs and configuration files