SAVELGOS(8)

NAME
savelogs - rotate logfiles

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

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 configuration file also allows you to configure how backup files are named and whether they are compressed.

A file description is file is a filename, followed by a list of commands, with punctuation and case ignored.

EVERY [DAY|WEEK|MONTH|YEAR]
    Rotate the log at this time.

SAVE n IN directory
    Save n old logs in the named directory. Previously existing files will be renamed to accomodate the new file up to the number of files you want to save. Backup file names are the filename prefixed with a number counting from zero up.

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.

CLASS “class”
    This file is backed up in class.

SIGNAL “action”
    After rotating a log and TOUCHing it, run this command. savelogs attempts to batch SIGNALs, 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 week, 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(1) after it's finished.

To configure how backups are named and whether they are compressed, use the SET option command. The following options are defined:

dots
    Instead of using a revision number, prefix each backup file with “o 's,” where the older ones have more dots than the newer ones do.

suffix
    Put the revision # (or dots) at the end of the filename.

compressed
    Compress the backup files with @COMPRESS@.

COMMAND-LINE 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.

-C config-file
    Use the named config-file instead of the default (/etc/savelogs.conf).

AVAILABILITY
Current versions of savelogs can be found at http://www.pell.portland.or.us/~orc/Code/savelogs.

FILES

@confdir@/savelogs.conf
    The default configuration file

SEE ALSO
syslogd(8)

AUTHOR
David Parsons