# Logrotation


# Example Logrotate configs

/etc/logrotate.conf

Rotate daily and keep 14 previous logs

/path/to/file {
    daily
    missingok
    notifempty
    rotate 14
}

Rotate everything in a folder weekly if they are larger than 10MB

/path/to/folder {
    weekly
    compress
    size 10M
    rotate 4
}

Rotate if larger than 40MB, keep 10 previous logs

/path/to/file {
    size 40M
    rotate 10
    notifempty
}

# Force Rotate audit.log

systemctl kill -s SIGUSR1 auditd
Last Updated: 2021/03/31 12:28+00:00