Log rotation is a systems administration process in which log files are “rotated” so the log files do not grow to an unweildy size and fill up the hard disk and archival purposes.
An example log rotation scheme would be a daily splitting and renaming a service’s log files with their respective dates. The last seven days can be kept on the system in plaintext. The last seven day’s worth of logs would be available on the host for troubleshooting purposes. The next week would be on the host, but compressed; they can still be accessed with tools like zcat or zless, but take up less disk space. A week’s worth of logs available on a host is plenty for most typical troubleshooting, but often having the extra week comes in handy. Compressed log files older than two weeks old are sent to an archive server to meet data retention policies and deleted from disk.