diff --git a/examples/example.borg b/examples/example.borg index 26f20da312c27d47803c76c5788a05325dc192d2..8f536cb7d92b12dd7f95df830871e919858a428f 100644 --- a/examples/example.borg +++ b/examples/example.borg @@ -11,6 +11,13 @@ ## destination host and user. ## +## passed directly to borg commands, e.g. to use a particular remote +## borg executable (here: 'borg12'), set this to: +## options = --remote-path=borg12 +## +## Default: +# options = + ## default is 0, but set to 19 if you want to lower the priority. ## an example setting would be: ## nicelevel = 19 diff --git a/handlers/borg.helper.in b/handlers/borg.helper.in index c995310c57057c2bdf2023128abe2f954e1a653e..8d1c17bbb5d8099a552a615fa4c1fc99dd4fbf24 100644 --- a/handlers/borg.helper.in +++ b/handlers/borg.helper.in @@ -294,6 +294,13 @@ do_borg_finish() { ## - example.borg ## - $borg_docs +## passed directly to borg commands, e.g. to use a particular remote +## borg executable (here: 'borg12'), set this to: +## options = --remote-path=borg12 +## +## Default: +# options = + [source] EOF ## includes ## diff --git a/handlers/borg.in b/handlers/borg.in index 845f3d56984e0849387d58d8666a0add2370218e..d31d844687c83e04db8657fe9a4ba0d05f392586 100644 --- a/handlers/borg.in +++ b/handlers/borg.in @@ -22,6 +22,7 @@ export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes ### GET CONFIG ### +getconf options getconf testconnect yes getconf nicelevel 0 getconf ionicelevel @@ -109,7 +110,7 @@ if [ "$host" != "localhost" ] && ([ "$testconnect" = "yes" ] || [ "${test}" -eq if [ "$ret" = 1 ]; then debug "Connected to $host as $user successfully" else - teststr="borg list --show-rc -v $execstr_repository" + teststr="borg list $options --show-rc -v $execstr_repository" debug "$teststr" output=`su -c "$teststr" 2>&1` if echo "$output" | grep "terminating with success status" \ @@ -126,7 +127,7 @@ fi ### INIT IF NEEDED ### if [ "$init" == "yes" ]; then - initstr="borg init --encryption=$encryption $execstr_repository" + initstr="borg init $options --encryption=$encryption $execstr_repository" debug "executing borg init" debug "$initstr" if [ $test = 0 ]; then @@ -143,7 +144,7 @@ fi ### EXECUTE ### -execstr="borg create --stats --compression $compression" +execstr="borg create $options --stats --compression $compression" set -o noglob @@ -207,7 +208,7 @@ if [ "$prune" == "yes" ]; then if [ ! "$keep" == "0" ]; then prune_options="${prune_options} --keep-within=${keep}" fi - prunestr="borg prune $prune_options $execstr_repository" + prunestr="borg prune $options $prune_options $execstr_repository" debug "executing borg prune" debug "$prunestr" if [ $test = 0 ]; then