diff --git a/examples/example.borg b/examples/example.borg index 51ff90e0e36265b9d37fb8b96b1864f9fc1b256d..1ea48abcf4e10c6703bb6d6f23d8a4b362c7d0b4 100644 --- a/examples/example.borg +++ b/examples/example.borg @@ -23,6 +23,12 @@ ## Default: # testconnect = yes +## default is not to limit bandwidth. +## set to a number in kiBytes/second to limit bandwidth usage. +## +## Default: +# bwlimit = 0 + ###################################################### ## source section ## (where the files to be backed up are coming from) diff --git a/handlers/borg.in b/handlers/borg.in index 54574c418cf97949e822aa20011c88f23394695a..3a8c0481470214ea3f916de0533e4e00e6fec60a 100644 --- a/handlers/borg.in +++ b/handlers/borg.in @@ -20,6 +20,7 @@ export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes getconf testconnect yes getconf nicelevel 0 +getconf bwlimit setsection source getconf prune yes @@ -118,6 +119,10 @@ IFS=$SAVEIFS set +o noglob +if [ ! -z $bwlimit ]; then + execstr="${execstr} --remote-ratelimit=${bwlimit}" +fi + # include client-part and server-part execstr="${execstr} ${excludes} $execstr_repository::$execstr_archive ${includes}" debug "$execstr"