1

** edit 8/6/15 * So the crux of my problem turned out not to be some quirkiness with the config file. In the end it turned out I simply had multiple ssh directories in 2 different places, and was using the wrong one. It's an embarrassing mistake to make, but live and learn, right?

I'm trying to do a backup of my Nokia N900 (a linux box smart phone) with rsnapshot. For reasons I can't understand, rsnapshot throws up the following error:

rsync: Failed to exec /usr/bin/ssh -p 22 -i /home/thelemur/.ssh/id_rsa_n900: \
No such file or directory (2)

What's strange about this to me is that I can run the very same ssh command line from a bash terminal, and have no problem. I've tried playing with the backslashes, entering the rsnapshot command from root, and even placing a sudo directly in the rsnapshot config file. I've also checked my tab placement in the config file. Does anyone know what I've been doing wrong?

  • "I can run the very same line from a bash terminal..."  What command line?  You should probably show us the config file, too.  Please do not respond in comments; edit your question to make it clearer. – G-Man Jun 17 '15 at 7:56
0

If you have put this command in your cmd_ssh line, like this:

cmd_ssh     /usr/bin/ssh -p 22 -i /home/thelemur/.ssh/id_rsa_n900

then you have unfortunately tickled an interesting almost-bug in rsnapshot. The problem is that the cmd_ssh parameter takes the entire value - including spaces - as the ssh alternative to run, whereas what you (and previously I) would want in this scenario is shell parsing of the option.

What you need to do is either to create a little script that contains the necessary ssh invocation and call that, or to set up the ssh configuration in the $HOME/.ssh/ssh_config.

The former is easier; just put the following into a script such as /home/thelemur/.ssh/ssh_with_id_rsa_n900.sh:

#!/bin/sh
exec ssh -p 22 -i /home/thelemur/.ssh/id_rsa_n900 "$@"

Then make it executable chmod u+x /home/thelemur/.ssh/ssh_with_id_rsa_n900.sh, and finally use that in the rsnapshot configuration:

cmd_ssh     /home/thelemur/.ssh/ssh_with_id_rsa_n900.sh
  • Thanks for the tip. I'll give this one a shot, and let you know how I do. – thelemur89 Jun 18 '15 at 22:12
  • Sorry it took me so long to get back to you on this. – thelemur89 Aug 6 '15 at 22:36
  • My problem turned out to be a simple rookie mistake, but this post was the most helpful, since it gave me a new approach which helped me understand my problem. It also clearly explains a common and difficult to realize problem rsync users might encounter. – thelemur89 Aug 6 '15 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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