Stuck with include/exclude options

David E. Meier dev at eth0.ch
Fri Jan 7 16:25:14 GMT 2005


Hello list,

I try to keep a list of directories/files on windows in sync with the ones
on a remote machine. Basically syncing works fine, however I am
stuck/confused with the various possiblities using include/exclude
options. Your help is very much appreciated. Here's the scenario:

Local source dir: /cygdrive (seems to be required or else the cygwin-HOME
is set)
Remote destination dir: ~/data

Local file tree to be synced, that may vary each time rsync is run:

C:\test1\a1\
         b1\
         c1\
C:\test2\a2\
         b2\

So I created a file "files.txt" containing:

C/test1
C/test2

And then I call rsync:

$ rsync -avvr --temp-dir=temp --delete -e ssh --stats
--files-from=files.inc /cygdrive storage at 192.168.2.111:data

This copies all the directories just fine to the remote machine. However,
when I run rsync wiht a different file tree to be synced, say:

C:\test1\a1\
         b1\
         c1\
C:\test3\a3\
         b3\

The directory "~data/C/test2" does not get deleted on the remote side. How
can I achieve this? How do I have to set the options so that any
directory/file on the remote side that is not explicitly listed as include
path gets deleted?

Thanks VERY much for any help on this! Dave.




More information about the rsync mailing list