User:Rarkenin/Log rotation

From Wikipedia, the free encyclopedia

Log rotation is an automated process used in system administration, typically on servers, to swap out large log files for fresh ones at set intervals of time or log size, usually performed on Linux. Typically, a server running services such as a LAMP stack [note 1] will generate logs with every request, which will become extremely large and difficult to handle for administrators. [1] This is typically done on Linux using the logrotate utility. Each time logrotate is invoked, typically via a cronjob, logs will be swapped in or out, even if the service using these logs is still running, and a new log put in place for the server. Log rotation utilities may optionally delete all but the newest logs, mail the logs by e-mail, compress them using Gzip or other formats, or even copy snapshots of the log without affecting the actual log in use. [2]


Notes[edit]

  1. ^ However, almost any service keeping logs may use log rotation to manage its logs. This includes portions of the LAMP stack if, for instance, the database server is on a different physical server than Apache and PHP.

References[edit]

  1. ^ "Log rotation". Web Server Management: Running Apache 2.2 under Linux. Universite of Cambridge. Retrieved 9 December 2012. {{cite web}}: Unknown parameter |coauthors= ignored (|author= suggested) (help)
  2. ^ "logrotate(8) - Linux man page". Die.net Linux manpages. die.net. Retrieved 9 December 2012.