[borg] scrap exclude*, add create_options

This allows the handler to fully make use of the advanced command-line
options for "borg create", such as the replaced "exclude*" options and
others like "--read-special" and "--numeric-owner".
This commit is contained in:
Jerome Charaoui 2018-01-26 11:47:47 -05:00
parent e114ff68f4
commit 0132b2453a
2 changed files with 10 additions and 15 deletions

View File

@ -70,15 +70,15 @@ exclude = /var/lib/mlocate
exclude = /var/lib/postgresql
exclude = /var/lib/mysql
## exclude directories that contain a CACHEDIR.TAG file
## define extra command-line options for the "borg create" operation.
##
## Example:
## create_options = --exclude-caches
##
## for more info see : borg help create
##
## Default:
# excludecaches = no
## exclude files flagged NODUMP
##
## Default:
# excludenodump = no
# create_options =
## whether to prune (remove) older backups
##

View File

@ -27,8 +27,7 @@ setsection source
getconf init yes
getconf include
getconf exclude
getconf excludecaches no
getconf excludenodump no
getconf create_options
getconf prune yes
getconf keep 30d
getconf prune_options
@ -125,12 +124,8 @@ if [ ! -z $bwlimit ]; then
execstr="${execstr} --remote-ratelimit=${bwlimit}"
fi
if [ "$excludecaches" == "yes" ]; then
execstr="${execstr} --exclude-caches"
fi
if [ "$excludenodump" == "yes" ]; then
execstr="${execstr} --exclude-nodump"
if [ ! -z $create_options ]; then
execstr="${execstr} ${create_options}"
fi
# include client-part and server-part