🔄 Log Rotation Policy
The goal of this policy is to ensure proper management of log files, avoiding excessive disk usage while preserving logs for the necessary period.
📅 Retention Period:
Logs will be kept for 30 days.
After this period, older files are automatically compressed or deleted to free up space.
🗃️ Storage:
Active logs are stored in /var/log
.
Once rotated, logs are compressed (.gz
) and moved to an archive folder, such as /var/log/archive
.
This helps reduce disk usage while keeping old logs accessible for review if needed.
🕒 Log Rotation:
Logs are rotated daily 🗓️ to prevent files from growing too large.
The system keeps the last 7 copies of each log ♻️ (one per day).
The logrotate tool 🔧 is used to automate this process.
🔐 Security and Access:
Only authorized personnel 👩💻 have access to the logs.
Archived logs are protected from modification 🛡️ and should be regularly reviewed to detect potential security incidents.