diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-06-27 23:01:13 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-06-27 23:01:13 +0300 |
commit | fdab97d3badc7cc48aeadc54a0946e42976e8387 (patch) | |
tree | 46724a38846ef8c36cf53fa323b65bd1a2469363 | |
parent | 380b7047132b7747999c2bca1164671f5fb8c604 (diff) | |
download | beam-fdab97d3badc7cc48aeadc54a0946e42976e8387.tar.gz beam-fdab97d3badc7cc48aeadc54a0946e42976e8387.tar.bz2 |
Minor changes.
* beam.conf (backup_logrotate_conf): Initialize variable.
* cleaner.in: Include more detail in the initial verbose header.
* lib/beam/common.in (beam_logrotate): Pass $verbose to logrotate.
-rw-r--r-- | beam.conf | 14 | ||||
-rwxr-xr-x | cleaner.in | 2 | ||||
-rw-r--r-- | lib/beam/common.in | 2 |
3 files changed, 13 insertions, 5 deletions
@@ -15,14 +15,22 @@ echo >&2 "$0: WARNING: using default configuration boilerplate" # # Special variables, called hooks, allow you to supply arbitrary # procedures to be run before and after backup. -# When set, both variables must contain a whitespace-separated list of -# commands to be invoked. These commands will be invoked without arguments -# and run in order of their appearance in the list. +# When set, a hook must contain a whitespace-separated list of commands to +# be invoked. These commands will be invoked without arguments and in +# order of their appearance in the list. # Commands listed in openlog_hook are run before opening the logfile. The # most common use for this hook is to rotate an oversized logfile prior to # opening it. +# +# Beam's default hook is beam_logrotate, which uses logrotate(8) to manage +# the log file. openlog_hook=beam_logrotate +# Additional configuration for logrotate can be supplied in the +# backup_logrotate_conf variable. +backup_logrotate_conf="weekly +rotate 4 +" # The prologue_hook is a list of commands to run before starting backup # (or restore). prologue_hook= @@ -55,7 +55,7 @@ esac thisweek=$(date +%U) lastweek=$((thisweek - retainweeks)) -$verbose \# removing files older than week $lastweek +$verbose \# removing from $dir files ending in $suffix and older than week $lastweek if [ -z "$suffix" ]; then find $dir -type f -printf '%f\n' diff --git a/lib/beam/common.in b/lib/beam/common.in index e5ad7a6..cdb6e7c 100644 --- a/lib/beam/common.in +++ b/lib/beam/common.in @@ -202,6 +202,6 @@ $backup_logrotate_conf EOF umask $u test -d @LOCALSTATEDIR@/lib/beam || mkdir @LOCALSTATEDIR@/lib/beam - logrotate ${dry_run+-d} --state @LOCALSTATEDIR@/lib/beam/logrotate.state $conf + logrotate ${dry_run+-d} $verbose --state @LOCALSTATEDIR@/lib/beam/logrotate.state $conf rm $conf } |