Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to use rync locally (on a windows machine) to a remote server (my osx box) in order to test a remote deploy build script. I've done rsync before just fine between 2 linux servers, but I'm having problems now. Here is the output:

$ rsync -v -e ssh myuser@10.86.83.11:/Library/WebServer/sites/staging/app1/ ./export

skipping directory /Library/WebServer/sites/staging/app1/.

sent 8 bytes  received 13 bytes  3.82 bytes/sec
total size is 0  speedup is 0.00

$ 

or

$ rsync -avz -e ssh myuser@10.86.83.11:/Library/WebServer/sites/staging/app1/ ./export

receiving file list ... done
./

sent 26 bytes  received 68 bytes  17.09 bytes/sec
total size is 0  speedup is 0.00


$ 

remote app1 directory is empty while local export directory has 4 sub directories and then a bunch of files in each of those

share|improve this question

2 Answers 2

up vote 17 down vote accepted
rsync -v -e ssh myuser@10.86.83.11:/Library/WebServer/sites/staging/app1/ ./export

You didn't give it any options to put it into recursive mode like -r or -a.

remote app1 directory is empty while local export directory has 4 sub directories and then a bunch of files in each of those

Do you have the options backwards here? The command should be rsync [source] [DESTINATION]. If the app1 directory is empty and you are trying to copy an empty directory then you aren't going to do anything useful.

Perhaps you need something like this instead?

rsync -avz ./export/  myuser@10.86.83.11:/Library/WebServer/sites/staging/app1/ 

Also:

  • You should almost always include a trailing slash on directories with rsync.
  • Almost every version of rsync released in the last 5-10 years defaults to using ssh has the remote transport. You probably don't have to specify the -e ssh.
share|improve this answer
    
Wow.. that is quite embarrassing. Yes I mixed up source and dest... –  chrisan Feb 24 '12 at 20:33
    
+1 for "You should almost always include a trailing slash on directories with rsync." –  Walrus the Cat Oct 18 at 16:28

Trying enabling rsync's built in ability to output a log file, by adding the following option to your command.

--log-file=/path/to/log.file

You can also increase the verbosity by adding an extra -v option, e.g. -avvz, according to the man page, 'Two -v options will give you information on what files are being skipped and slightly more information at the end.'

If this information that returns doesn't help identify the problem, please edit your question and add the additional output.

share|improve this answer

Your Answer

 
discard

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.