SAVELOGS(8)

NAME
savelog - rotate logs

SYNOPSIS
savelogs [-dfv] [-V] [-C config-file]

DESCRIPTION
The savelogs program rotates logs, optionally saving the old ones elsewhere and signalling the programs that created the logfiles.

THE CONFIGURATION FILE
/etc/savelogs.conf tells savelogs which logs to rotate, when to rotate them, whether to back them up, and what to do after a log is rotated. The format of the configuration file is a filename, followed by a list of commands, with punctuation and case ignored.

EVERY DAY|WEEK|YEAR
    Rotate the log at this time. If you tell it WEEK (YEAR), the rotation will happen on a sunday (the last sunday of the year).

SAVE n IN directory
    Save n old logs in the named directory as o.log. Previously existing files will be renamed to ofile to accomodate the new file (so the old o.log becomes oo.log, and so on), up to the number of files you want to save.

TOUCH mode
    After rotating the old log, create a new (empty) log with the given mode.

SIZE size
    Rotate the log if it gets larger than this size. If you suffix the size with K, the size is in kilobytes, and a M suffix means megabytes.

SIGNAL action
    After rotating a log and TOUCHing it, run this command. savelogs attempts to batch SIGNAL, so that if multiple logs are rotated the actions will only be executed once.

For example, the following configuration file
/var/adm/syslog EVERY WEEK
                SAVE 2 IN /var/adm/OLD
                TOUCH 644
                SIGNAL "killall -HUP syslogd"

Rotates /var/adm/syslog every sunday, creating a new empty file with mode 644, saving two of the old logs in /var/adm/OLD, and sending a HUP signal to syslogd after it's finished.

OPTIONS

-V  Print version information, then exit.

-d  Print debugging information. More -d flags make savelogs generate more debugging.

-f  Rotate all logs, no matter what.

-Cconfig-file
    Use the named config-file instead of the default /etc/savelogs.conf.

FILES
/etc/savelog.conf-- the default configuration file

SEE ALSO
syslogd(8)

AUTHOR
David Parsons (orc@pell.chi.il.us)