diff --git a/examples/example.borg b/examples/example.borg index e5285f46395ab856dbae035d4d23b59186dab9af..65d56bd3204ab481b92875024e6e46ee245ec039 100644 --- a/examples/example.borg +++ b/examples/example.borg @@ -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. ## -## Default: -# excludecaches = no - -## exclude files flagged NODUMP +## Example: +## create_options = --exclude-caches +## +## for more info see : borg help create ## ## Default: -# excludenodump = no +# create_options = ## whether to prune (remove) older backups ## diff --git a/handlers/borg.in b/handlers/borg.in index 9fe70b88ebc48d4c552e9d24ec5b2bc65f9ff2b7..9150d4eaf1226b6de9f7dcb881dd0712df2eab44 100644 --- a/handlers/borg.in +++ b/handlers/borg.in @@ -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