aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-01-29 14:40:46 +0100
committerintrigeri <intrigeri@boum.org>2012-01-29 16:44:12 +0100
commit5bfa30bb22cbfe37e06c2c442fe77b5a02602184 (patch)
tree424d227845d94312fb3c8c06d0815076e9f4ade1 /handlers
parentf896ef3f6525cfedd345aae23e6fd8274d90dc24 (diff)
downloadbackupninja-5bfa30bb22cbfe37e06c2c442fe77b5a02602184.tar.gz
backupninja-5bfa30bb22cbfe37e06c2c442fe77b5a02602184.tar.bz2
Support bandwidthlimit again with new duplicity, using trickle.
duplicity 0.6.17 uses paramiko backend. Thus, it does not support limiting bandwidth anymore. Let's use trickle to support bandwidth shaping anyway.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/dup.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/handlers/dup.in b/handlers/dup.in
index 6fbb27a..b1de651 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -122,6 +122,11 @@ if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -g
|| warning 'duplicity >= 0.6.17 only supports the IdentityFile SSH option'
fi
execstr_options="${execstr_options} --ssh-options '$sshoptions'"
+ # FIXME: use trickle
+ if [ "$bandwidthlimit" != 0 ]; then
+ [ -z "$desturl" ] || warning 'The bandwidthlimit option is not used when desturl is set.'
+ execstr_precmd="trickle -s -d $bandwidthlimit -u $bandwidthlimit"
+ fi
## duplicity < 0.6.17 : scp/sftp backend
else
scpoptions="$sshoptions"