Hello I am new to rsync but I started the cwRsyncServer daemon on an Windows 2003 Server machine with this exclude option: exclude = *.obj Debug *~ *.bak *.orig .svn Thumbs.db Copy?of?* Kopie?van?* .* This option I have placed in the global section so I won't have to repeat it on every module. You can see my rsyncd.conf file attached. The problem is now all my files get excluded Now on the client I call rsync like this: B:\Projects\MediaShops\CodeBase>"rsync" --compress --exclude=*~ --exclude=Thumbs.db --exclude=*.bak --exclude=*.orig --exclude=Copy?of?* --exclude=Kopie?van?* --sparse --recursive --times --update --verbose "--compare-dest=/cygdrive/b/Projects/MediaShops/CodeBase" "./" "Adrian@nt11::CodeBasePublic/" (this is all on one line, from a Win32 batch file) and I get an output like building file list ... done skipping server-excluded file "." skipping server-excluded file "rsync.log" skipping server-excluded file "script.pl" skipping server-excluded file "Connections" skipping server-excluded file "CustomerLogos" skipping server-excluded file "CustomerLogos/logo_flag.gif" skipping server-excluded file "CustomerLogos/top_flag.jpg" .... .... with all my files in the source tree listed as excluded by the server. Can you tell me what is wrong here and what is the correct syntax for patterns in the exclude option for rsyncd modules ? I search for this problem in the list and did not found the answer to my question :( Can you please also tell me how to use exclude patterns with spaces in rsyncd.conf ? The documentation for conf file only says the patterns are space-separated ! I really think it should also say what to do with patterns with spaces inside. I think the documentation is not helping first-time windows (cygwin) users too much, for example if you don't already know that post-xfer exec is a command line for sh.exe and you have to start the process in cygwin syntax (with /cygdrive/d/process) but send its arguments in the normal Win32 syntax (with D:\process) for which you will have to escape the backslashes with \\. Also cwRsyncServer has no sh.exe installed by default, I had to visit the web site to find out I have to copy the installed bash.exe as sh.exe :( And I have another question: can the post-xfer proess know, by looking at the RSYNC_ environment variables, if the transfer was a read or a write ? Thank you Timothy Madden Romania -------------- next part -------------- A non-text attachment was scrubbed... Name: rsyncd.conf Type: application/octet-stream Size: 1356 bytes Desc: not available Url : http://lists.samba.org/archive/rsync/attachments/20060918/a5c63f2b/rsyncd.obj
The trouble is that your .* exclude pattern is matching . , the top level of the module, because * can match the empty string:> skipping server-excluded file "."If your intent was to match hidden files, change the pattern to .?* to match a period followed by at least one character. Are you sure you need to use daemon excludes? They are meant as a security policy to prevent clients from accessing or uploading files at excluded paths. If you only want to skip uploading some of the files in the source directory, get rid of the daemon excludes and use only the client excludes (on the command line). This will also fix the problem because rsync never allows . to be affected by client excludes. It's not clear to me whether daemon excludes should match the top level of a module or whether the behavior is a bug, since the documentation of the daemon exclude settings in rsyncd.conf(5) is inadequate. I am left wondering what the meanings of "- /foo", "-/ foo", and "-/ /foo" are for a daemon and how to exclude a file at a certain path from the root of the module (as opposed to the transfer or the filesystem). I tried to figure this out from the source code, but the filter-matching code is really difficult to understand. Wayne, please help! Matt