Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if I could get some help with this rsync command. I am trying to copy files from a remote system by running rsync on the local system.

Here is my command:

/usr/bin/rsync -avz serverbackup@SERVERIP:/home/serverrestore/game1/20132508.tar.gz /home/username/game1/ 'ssh -i /etc/claire/key'

However I am getting this error here:

Unexpected local arg: /home/nharasym/game257/
If arg is a remote file/dir, prefix it with a colon (:).
rsync error: syntax or usage error (code 1) at main.c(1246) [Receiver=3.0.9]

Any ideas on how to solve this problem?

share|improve this question
up vote 1 down vote accepted

You are missing -e argument before the ssh code, and also, it should be before the source and destination. The following command should work (provided the permissions on the key file and enclosing directory are satisfactorily secured per the standard requirements of ssh)

/usr/bin/rsync -avz -e 'ssh -i /etc/claire/key' serverbackup@SERVERIP:/home/serverrestore/game1/20132508.tar.gz /home/username/game1/
share|improve this answer
That works, thank you very much – icebox3d Aug 26 '13 at 3:09

Your Answer


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.