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?
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/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments