Package: backupninja
Severity: important
Tags: patch

Hello,

the dup backend fails to give duplicity an sftp command.  If you use a 
separate identity file, duplicity will therefore fail, since it uses 
sftp as part of its ssh/scp backend.

The included patch adds the possibility to give sftpoptions in the dup 
configuration file.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-686
Locale: LANG=sv_SE.utf8, LC_CTYPE=sv_SE.utf8 (charmap=UTF-8)
============================================================
--- examples/example.dup        ae500c0f943b4baf0dbce5d46feab55740945d9c
+++ examples/example.dup        8ffd6bfe6bd687619b1eb11d8623dacda72f7520
@@ -108,6 +108,9 @@ sshoptions = -i /root/.ssh/id_dsa_duplic
 # passed directly to ssh and scp
 sshoptions = -i /root/.ssh/id_dsa_duplicity
 
+# passed directly to sftp
+sftpoptions = -o IdentityFile=/root/.ssh/id_dsa_duplicity
+
 # put the backups under this directory
 destdir = /backups
 
============================================================
--- handlers/dup        0dcb23b46d7b6057700fcd136fd774c447718c94
+++ handlers/dup        4349efd020d03bf277427b22fbe78fc4d7555be2
@@ -24,6 +24,7 @@ getconf sshoptions
 getconf incremental yes
 getconf keep 60
 getconf sshoptions
+getconf sftpoptions
 getconf bandwidthlimit 0
 getconf desthost
 getconf destdir
@@ -72,7 +73,7 @@ scpoptions="$sshoptions"
 scpoptions="$sshoptions"
 [ "$bandwidthlimit" == 0 ] || scpoptions="$scpoptions -l $bandwidthlimit"
 
-execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' 
--ssh-command 'ssh $sshoptions' "
+execstr="$options --no-print-statistics --scp-command 'scp $scpoptions' 
--ssh-command 'ssh $sshoptions' --sftp-command 'sftp $sftpoptions' "
 
 # deal with symmetric or asymmetric (public/private key pair) encryption
 if [ -n "$encryptkey" ]; then

Reply via email to