Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
I'm using duplicity 0.6.15 if that's of any help... –  leeand00 Nov 22 '11 at 16:50

5 Answers 5

up vote 1 down vote accepted

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

share|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

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.

share|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

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

share|improve this answer

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.

share|improve this answer

Although in the risk of getting -1, I want to clarify on the common mistakes we make on duplicity format (which the original question has made).

We commonly forget the second "//" in the host for example:

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

The error is that (although somebody has indicated that it should be not be ":") the format should be:

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

I commonly forget to use the "//" (although for me, I get different errors).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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