]> gitweb.fluxo.info Git - backupninja.git/commitdiff
Support bandwidthlimit again with new duplicity, using trickle.
authorintrigeri <intrigeri@boum.org>
Sun, 29 Jan 2012 13:40:46 +0000 (14:40 +0100)
committerintrigeri <intrigeri@boum.org>
Sun, 29 Jan 2012 15:44:12 +0000 (16:44 +0100)
duplicity 0.6.17 uses paramiko backend.
Thus, it does not support limiting bandwidth anymore.
Let's use trickle to support bandwidth shaping anyway.

ChangeLog
handlers/dup.in

index 65b9cc53f1c583e4ab8a070297952f5ac5bd5c49..65a994a5ed75ab87f95ad969036c0d7e9086975d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@ version 1.0 -- UNRELEASED
           example.dup.
         . Add support for RackSpace's CloudFiles.
           Thanks to Yuval Kogman <nothingmuch@woobling.org> for the patch.
+        . Support bandwidthlimit with new duplicity, using trickle.
        mysql:
         . Don't attempt to dump performance_schema database (Redmine#3741).
     build system changes
index 6fbb27a042f3cefaf38a7855d9e53d6c4048da15..b1de651f759d466e8fb475542be0e707990237e1 100644 (file)
@@ -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"