I have spent quite a bit of time trying to Rsync from a remote to a local machine but been having issues with finding the synced files apparently.

The command I entered is:

sync -avzhe "~/var/test2/*" -e "ssh -i /etc/nginx/WhatsDue.pem" ubuntu@ec2********.compute-1.amazonaws.com:/var/test/

The command seems to be running properly:

    receiving incremental file list
drwxr-xr-x          4.10K 2015/02/25 19:15:48 .
-rwxrwxrwx             11 2015/02/25 19:15:48 test222.txt

sent 20 bytes  received 66 bytes  34.40 bytes/sec
total size is 11  speedup is 0.13

However, when I go to the "~/var/test2/" folder, I can't find the test222.txt file there.

Can you please help?


  • is there /var/test2 at all present on local machine ? – klerk Feb 25 '15 at 20:49
  • yes. I just entere the following command: sudo rsync -avzh -e "ssh -i /etc/nginx/***.pem" /var/test2/* ubuntu@ec2-*****.compute-1.amazonaws.com:/var/test/ And got the following result: sending incremental file list tester.txt rsync: mkstemp "/var/test/.tester.txt.n7vYn6" failed: Permission denied (13) sent 101 bytes received 116 bytes 144.67 bytes/sec total size is 8 speedup is 0.04 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0] – mozyak Feb 25 '15 at 21:21
  • are the permissions for /var/test/.tester.txt.n7vYn6 same as for user with whom you are perfomring ssh inside rsync – klerk Feb 25 '15 at 21:34

Your Answer

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

Browse other questions tagged or ask your own question.