rsync backup: Add option for specifying custom rsync options.
This commit is contained in:
parent
bb0bd73076
commit
159484ec3e
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 $?
|
||||
|
|
Loading…
Add table
Reference in a new issue