Platform variations with --exclude-from

Joseph L. Casale jcasale at activenetwerx.com
Mon May 27 07:45:17 MDT 2013


On Linux, an rsync command and exclude_file contents of:

# cat exclude_file
/etc/alsa
# rsync -a --delete --delete-excluded --exclude-from=exclude_file /etc server::module

properly excludes /etc/alsa but not any file within /etc's directories that is named alsa.

On Windows I don't seem to be able to reliably emulate this:

C:\Scripts\Backup\rsyncd>type rsyncd_exclude
/cygdrive/d/$RECYCLE.BIN
/cygdrive/d/Exclude
/cygdrive/d/Inetpub
/cygdrive/d/System Volume Information
C:\Program Files (x86)\cwRsync\bin>rsync -a --delete --delete-excluded --exclude-from=exclude_file /cygdrive/d server::module

fails to omit these, the only way I get this to work is:

C:\Scripts\Backup\rsyncd>type rsyncd_exclude
*/$RECYCLE.BIN
*/Exclude
*/Inetpub
*/System Volume Information

Which obviously excludes nested objects of the same name as its not anchored. Anyone know if this can be corrected?
What is the nuance for anchoring patterns to the root of the source in Windows with the cwrsync build?

Thank you,
jlc


More information about the rsync mailing list