From ab9689d77fbbb9ad031156e5617c8f6e70d111ee Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 16 Oct 2018 09:34:29 -0600 Subject: [PATCH] Sample logrotate file for backup log --- etc/logrotate.d/backup | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 etc/logrotate.d/backup diff --git a/etc/logrotate.d/backup b/etc/logrotate.d/backup new file mode 100644 index 0000000..4ec9385 --- /dev/null +++ b/etc/logrotate.d/backup @@ -0,0 +1,15 @@ +### Rotate backup log file + +# location of log file (-l parameter of script file) +/path/to/backup.log { + + # rotate log file weekly -- you could also use 'daily', 'monthly' or + # specify a size using 'size 100k', for example + weekly + + # keep 4 weeks of old logs (4 files) and delete older ones + rotate 4 + + # compress old log files using gzip (default) + compress +}