0

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?

leeand00
  • 4,869
  • 15
  • 69
  • 110

5 Answers5

1

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

Tablemaker
  • 1,149
  • 1
  • 11
  • 23
  • 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
0

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.

Hanan
  • 378
  • 5
  • 16
  • 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
0

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

quanta
  • 51,413
  • 19
  • 159
  • 217
0

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.

leeand00
  • 4,869
  • 15
  • 69
  • 110
0

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).