0

We use rsync to transfer IIS logfiles from our web servers to our analytic server.

There are many folders which are currently all being transferred and we now only need certain folders to be transferred:

Logfiles on web server folder structure example:

D:\logfiles\asia\China\
D:\logfiles\asia\Singapore\
D:\logfiles\europe\Cyprus\
D:\logfiles\europe\Italy\
D:\logfiles\europe\Portugal\
D:\logfiles\europe\UK\
D:\logfiles\middle-east\Qatar\
D:\logfiles\middle-east\Dubai\

There are many more folders than the example above.

As an example, I want only transfer the UK folder in europe and ignore Cyprus\Italy\Portugal along with transferring the other region folders too.

I put the following in a text file to test:

+ /europe/UK/

and then run this command:

"C:\Program Files (x86)\cwRsync\bin\rsync.exe" -vzut --include-from=/cygdrive/d/RSync/inclusions.txt -r 192.168.0.1::logfiles/ /cygdrive/d/logfiles/server1

However, it still transfers every folder!

I can get an --exclude-from= file to work but as there are many many folders I assumed an include folder would be quicker as I only want a few folders to still transfer.

Any ideas what I am doing wrong?

2 Answers 2

0

Try removing the + from the include file, and also use forward slashes instead of backslashes - I'm not entirely certain (it's been a very long time since I used rsync on Windows) but this should solve your issues.

1
  • slash direction is a typo as I copied the D:\ versions above when writing question... thanks for answer :) Aug 2, 2013 at 7:26
0

I managed to get it to work using --from-file= with a file with the following example of contents:

/europe/UK/
/asia/
/middle-east/

Not to say other answers wouldn't have worked too, I just got it working this way before I could try other methods.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .