aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-06-24 14:11:22 +0000
committerintrigeri <intrigeri@boum.org>2008-06-24 14:11:22 +0000
commitc18c24b4e2aebf5328a3b4adc03895f6a5dffe04 (patch)
treefcbf8e53a0362071be7668be4834c6241cc26334
parentf0caa9cc1bc25a9944ceb82d33a116e14bee4632 (diff)
downloadbackupninja-c18c24b4e2aebf5328a3b4adc03895f6a5dffe04.tar.gz
backupninja-c18c24b4e2aebf5328a3b4adc03895f6a5dffe04.tar.bz2
dup: warn about bandwithlimit being unused when desturl is set
-rw-r--r--examples/example.dup4
-rw-r--r--handlers/dup.helper.in4
-rw-r--r--handlers/dup.in5
3 files changed, 8 insertions, 5 deletions
diff --git a/examples/example.dup b/examples/example.dup
index 91ff07e..830a47d 100644
--- a/examples/example.dup
+++ b/examples/example.dup
@@ -121,8 +121,8 @@ exclude = /home/*/.gnupg
#keep = yes
# full destination URL, in duplicity format; if set, desturl overrides
-# sshoptions, destdir, desthost and destuser, and disables testconnect
-# For details, see duplicity manpage, section "URL FORMAT".
+# sshoptions, destdir, desthost and destuser; it also disables testconnect and
+# bandwithlimit. For details, see duplicity manpage, section "URL FORMAT".
#desturl = file:///usr/local/backup
#desturl = rsync://user@other.host//var/backup/bla
diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in
index 96828ef..c1fbdd5 100644
--- a/handlers/dup.helper.in
+++ b/handlers/dup.helper.in
@@ -398,8 +398,8 @@ incremental = $dup_incremental
keep = $dup_keep
# full destination URL, in duplicity format; if set, desturl overrides
-# sshoptions, destdir, desthost and destuser, and disables testconnect
-# For details, see duplicity manpage, section "URL FORMAT".
+# sshoptions, destdir, desthost and destuser; it also disables testconnect and
+# bandwithlimit. For details, see duplicity manpage, section "URL FORMAT".
#desturl = file:///usr/local/backup
#desturl = rsync://user@other.host//var/backup/bla
diff --git a/handlers/dup.in b/handlers/dup.in
index cae9909..0f4e58e 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -105,7 +105,10 @@ duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`"
# --sftp-command ourselves
scpoptions="$sshoptions"
-[ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit"
+if [ "$bandwidthlimit" =! 0 ]; then
+ [ -z "$testurl" ] || warning 'The bandwidthlimit option is not used when desturl is set.'
+ scpoptions="$scpoptions -l $bandwidthlimit"
+fi
# < 0.4.2 : only uses ssh and scp
if [ "$duplicity_major" -le 0 -a "$duplicity_minor" -le 4 -a "$duplicity_sub" -lt 2 ]; then