Skip to content
Snippets Groups Projects
Commit a9da4a0b authored by Guillaume Subiron's avatar Guillaume Subiron
Browse files

Merge branch 'fix-11349' into 'master'

Quick fix for #11349 : Add support for generic options config value

See merge request !67
parents 183b8c30 731d15eb
Branches
No related tags found
1 merge request!67Quick fix for #11349 : Add support for generic options config value
...@@ -11,6 +11,13 @@ ...@@ -11,6 +11,13 @@
## destination host and user. ## 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. ## default is 0, but set to 19 if you want to lower the priority.
## an example setting would be: ## an example setting would be:
## nicelevel = 19 ## nicelevel = 19
......
...@@ -294,6 +294,13 @@ do_borg_finish() { ...@@ -294,6 +294,13 @@ do_borg_finish() {
## - example.borg ## - example.borg
## - $borg_docs ## - $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] [source]
EOF EOF
## includes ## ## includes ##
......
...@@ -22,6 +22,7 @@ export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes ...@@ -22,6 +22,7 @@ export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
### GET CONFIG ### ### GET CONFIG ###
getconf options
getconf testconnect yes getconf testconnect yes
getconf nicelevel 0 getconf nicelevel 0
getconf ionicelevel getconf ionicelevel
...@@ -109,7 +110,7 @@ if [ "$host" != "localhost" ] && ([ "$testconnect" = "yes" ] || [ "${test}" -eq ...@@ -109,7 +110,7 @@ if [ "$host" != "localhost" ] && ([ "$testconnect" = "yes" ] || [ "${test}" -eq
if [ "$ret" = 1 ]; then if [ "$ret" = 1 ]; then
debug "Connected to $host as $user successfully" debug "Connected to $host as $user successfully"
else else
teststr="borg list --show-rc -v $execstr_repository" teststr="borg list $options --show-rc -v $execstr_repository"
debug "$teststr" debug "$teststr"
output=`su -c "$teststr" 2>&1` output=`su -c "$teststr" 2>&1`
if echo "$output" | grep "terminating with success status" \ if echo "$output" | grep "terminating with success status" \
...@@ -126,7 +127,7 @@ fi ...@@ -126,7 +127,7 @@ fi
### INIT IF NEEDED ### ### INIT IF NEEDED ###
if [ "$init" == "yes" ]; then if [ "$init" == "yes" ]; then
initstr="borg init --encryption=$encryption $execstr_repository" initstr="borg init $options --encryption=$encryption $execstr_repository"
debug "executing borg init" debug "executing borg init"
debug "$initstr" debug "$initstr"
if [ $test = 0 ]; then if [ $test = 0 ]; then
...@@ -143,7 +144,7 @@ fi ...@@ -143,7 +144,7 @@ fi
### EXECUTE ### ### EXECUTE ###
execstr="borg create --stats --compression $compression" execstr="borg create $options --stats --compression $compression"
set -o noglob set -o noglob
...@@ -207,7 +208,7 @@ if [ "$prune" == "yes" ]; then ...@@ -207,7 +208,7 @@ if [ "$prune" == "yes" ]; then
if [ ! "$keep" == "0" ]; then if [ ! "$keep" == "0" ]; then
prune_options="${prune_options} --keep-within=${keep}" prune_options="${prune_options} --keep-within=${keep}"
fi fi
prunestr="borg prune $prune_options $execstr_repository" prunestr="borg prune $options $prune_options $execstr_repository"
debug "executing borg prune" debug "executing borg prune"
debug "$prunestr" debug "$prunestr"
if [ $test = 0 ]; then if [ $test = 0 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment