CYGWIN Rsync exclude/include problem

Mike Lavender Mike.Lavender at
Sat Mar 22 04:22:15 EST 2003

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.

More information about the rsync mailing list