Using my private key to do so, this command allows me to connect to /home/backupUser/backup just fine:

$ sudo sftp -oPort=7843 backupUser@192.168.x.x:backup

However when I run duplicity, I get the following error:

duplicity full --exclude ... / scp://backupUser:passwd@192.168.x.x:7843:/backup 

bash: wd@192.168.x.x:7843./backup: No such file or directory

I'm under the assumption that duplicity would interpret the /backup path as relative to the user's home directory.

But since the above command didn't work, I also tried leaving off the / in the backup directory at the end of the command, i.e.

duplicity full --exclude ... / scp://backupUser:passwd@192.168.x.x:7843:backup 
bash: wd@192.168.x.x:7843:backup: command not found

Is there something I'm missing here, like adding the passcode for the private key to make this command work?

link|improve this question

68% accept rate
I'm using duplicity 0.6.15 if that's of any help... – leeand00 Nov 22 '11 at 16:50
feedback

4 Answers

up vote 1 down vote accepted

I think you need to remove : in your command. Please refer here

link|improve this answer
Okay so I changed the command to duplicity --exclude ... / scp:/backupUser:passwd@192.168.x.x:7843//home/backupUser/backup and I still get the same error of pw@192.168.2.251:7843//home/backupUser/backup: No such file or directory – leeand00 Nov 22 '11 at 16:48
feedback

since your are using bash i assume you want to connect to a linux user, you should try to append the ~ sing before the /directory , it is in order to go into the users home directory.

i know it should be like that automaticly, since you are try to connect the backup user, but as i can see in you question the two ansers you are getting from bash are diefferent, one is with ./backup and the other is :backup, so i think that you should try with the ~ sign.

link|improve this answer
Tried the command as duplicity --exclude ... / scp:/backupUser:passwd@192.168.x.x:7843~/backup and I still get the same error of pw@192.168.2.251:7843~/backup: No such file or directory – leeand00 Nov 22 '11 at 16:52
feedback

I'm under the assumption that duplicity would interpret the /backup path as relative to the user's home directory.

Right. But the syntax is different than the normal scp format. Remove the colon and try again:

duplicity full --exclude ... / scp://backupUser:passwd@192.168.x.x:7843/backup

link|improve this answer
feedback

Okay figured it out...thanks for all your help!

I tried an sftp command on it's own, and noticed that I was getting the same error (No such file or directory) whenever I left out the -oPort argument.

#An sftp command I tried on it's own...
#sftp -oIdentityFile=/root/.ssh/id_rsa -oPort=7843 -oServerAliveInterval=15 -oServerAliveCountMax=2 buser@192.168.2.251

I made the changes to the path suggested by @Sivaram Kannan above, and added the -oPort argument to the --ssh-options, and that seemed to fix the problem:

sudo duplicity   --ssh-askpass --dry-run  --num-retries 1 --ssh-options="-oPort=7843 -oIdentityFile=/root/.ssh/id_rsa" \
 --exclude /proc --exclude /tmp --exclude /mnt --exclude /dev --exclude /sys \
--force / scp://buser@192.168.x.x:7843//home/backupUser/backup

(And of course the --dry-run parameter keeps it from running just testing it out)

Seemed to do the trick.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.