CYGWIN Rsync exclude/include problem

Mike Lavender Mike.Lavender at
Sat Mar 22 13:18:52 EST 2003

Thank you all for your input.
It turns out that the problem is a CRLF/LF problem. I'm including the explanation of the problem/solution for others.
Using -vvv resulted in the listing of include/excludes as follows (I have only listed a couple of lines to keep it short):

,exclude)de(+ Databases/
,exclude)de(+ Documents and Settings/
This seemed odd but not unreasonable, having never seen the proper output from the -vvv option. What clued me in was that when I dumped the output to a log file using rsync blahblahblah >output.txt I got the following:

add_exclude(+ Databases/,exclude)
add_exclude(+ Documents and Settings/,exclude)
add_exclude(- Documents and Settings/NetworkService/,exclude)

This was a bit more intuitive and suggested to me that it might be a CRLF/LF issue.

I was aware of the difference between a *nix EOL and Windows EOL so I created the file using Word with Line feeds instead of just <ENTER>. Apparently this was not enough. Ultimately if I recreate the list using PICO the listing appeared as above instead. Problem solved!!!

Now that I have it working (the way the man pages say it should) I can tidy up my list!

It does raise the following question. What is the actual WINDOWS character code for a *nix line feed. eg. chr(13)???. 

Thanks again.
Mike Lavender

-----Original Message-----
From: Mike Lavender 
Sent: March 21, 2003 12:22 PM
To: rsync at
Subject: CYGWIN Rsync exclude/include problem

I'm having troubles with getting rsync 2.5.5 (CYGWIN version) to include/exclude files they way I expect it to. I have mulled over the list postings and man pages regarding this and I am either missing something or ... well I don' know.

I have a drive with 12 folders in the root however, I only want to rsync 5 of them (the ones marked with an *) and in those 4 I want to exclude certain folders and file patterns. The Root looks like this:

/Copied DVD
/Databases    *
/Documents and Settings    *
/Inetpub    *
/Plus11    *
/Program Files
/rsync    *
/Trial Software

Using the following command line and includes.txt file I still get the Backup, Copied DVD etc folders. If I add a global * or /* then nothing gets rsynced. I have "commented" the include file to explain my logic. Any advice would be great!

Thanks in advance.
Mike Lavender

Command Line:
rsync -avvvzl --stats --delete --delete-excluded --exclude-from=c:\rsync\includes.txt /cygdrive/c/ mike at puk::LaptopBackup

+ /Databases/    #Include /Databases & subfolders

+ /Documents and Settings/     #Include /Documents and Settings & subfolders
- /Documents and Settings/NetworkService/     #Exclude /NetworkService subfolders
- /Documents and Settings/LocalService/     #Exclude /LocalService subfolders
- /Documents and Settings/All Users/     #Exclude /All Users subfolders
- /Documents and Settings/Default Users/     #Exclude /Default Users subfolders

+ /Inetpub/    #Include /Inetpub & subfolders
+ /Inetpub/wwwroot/    #Include /Inetpub/wwwroot & subfolders
- /Inetpub/*    #Exclude /files and other folders?? in Inetpub

+ /Plus11/
+ /Plus11/MYOBData/
+ /Plus11/Forms/
+ /Plus11/Old*/    #Include folders that start with Old
- /Plus11/*

+ /rsync/

- *.tmp    #Exclude all *.tmp files
- Temp/    #Exclude all Temp folders
- UserData/    #Exclude all UserData folders
- *.dmp
- Temporary Internet Files/
- cache/
- Help/
- /*     #exclude not specifically included files * folders in the root.

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list