rsync backup: Add option for specifying custom rsync options.

This commit is contained in:
Ossi Herrala 2014-05-05 09:35:14 +00:00
parent bb0bd73076
commit 159484ec3e
2 changed files with 6 additions and 2 deletions

View file

@ -117,6 +117,9 @@ class rsync::backup {
# (optional) Enable rsync ACL. Defaults to enabled. Set to false
# to disable.
#
# $options:
# (optional) Rsync options for job. For example "--bwlimit=300".
#
define rsync::backup_job (
$source_host="",
$target_host="",
@ -126,6 +129,7 @@ define rsync::backup_job (
$hour,
$minute=0,
$enable_acl=true,
$options="",
) {
include rsync

View file

@ -7,7 +7,7 @@ FLOCK_OPTS="--exclusive --nonblock"
FLOCK_FILE="/var/lock/<%= @name -%>"
RSYNC="/usr/bin/rsync"
RSYNC_OPTS=( -ax <%= @acl ? "-A" : "" -%> --delete --itemize-changes <%= @_excludes -%> )
RSYNC_OPTS=( -ax <%= @acl ? "-A" : "" -%> <%= @options ? options : "" -%> --delete --itemize-changes <%= @_excludes -%> )
(
$FLOCK $FLOCK_OPTS 200 || exit $?