I am new to rsync but attempting to setup a backup server.

User names follow this basic idea:

remote user: computer
local user: computer-bkup.

When I run

$ rsync -avz -e ssh computer@computer.somewhere.com:$HOME/bar/ $HOME/Documents/foo

and enter the password for computer I get

rsync: change_dir "/home/computer-bkup/bar" failed: No such file or directory.<br>

I've looked into file permissions and other related posts for this error. Here's where my head gets twisted though. My src directory is /home/computer/bar with a source of /home/computer-bkup/foo. If the error message had a problem with either of those I can see a permission issue. An error with /home/computer-bkup/bar tends to make me think it's trying to find /home/computer-bkup on the remote machine.

As that doesn't make sense where do I most likely have issues? Permission on local machine, remote machine or something else completely?


The $HOME variable is expanded by the shell on the local machine. So, both $HOME are replaced by /home/compute-bkup/ (the home directory of the local machine). You must replace the first $HOME by /home/computer/


rsync -avz -e ssh computer@computer.somewhere.com:bar/ $HOME/Documents/foo

will also work, because the default remote path is the home directory

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.