Files getting excluded.. don't understand why?

Dave Dykstra dwd at bell-labs.com
Fri Feb 1 04:36:24 EST 2002


On Thu, Jan 31, 2002 at 12:47:41AM -0600, Dustin Puryear wrote:
> I am trying to use rsync along with find to quickly copy changes to mirrors 
> for some web sites. The basic idea is:
> 
> 1 look for files newer than X >> export-file
> 2 rsync --include-from=export-file remote-server:/remote-path
> 
> Simple enough. Unfortunately, I can't get this to work. Step 1 works well 
> enough. However, when I use rsync it appears that rsync is excluding the 
> files I added via export-file. I'm not sure what I'm doing wrong. Here is 
> the command I am using:
> 
> rsync -vvv -e ssh -r --include-from=$TOCOPY localhost:/home/dpuryear/testdir2


Problem 1: you need to specify both source and destination directories.

Problem 2: by default all files are included, so adding a --include-from
    doesn't do anything unless you also finish it with an --exclude '*'.

Problem 3: doing an --exclude '*' will also exclude parent directories so
    you will need to explicitly include all parent directories.  I'm
    planning on writing an option to rsync called --files-from that will
    permit specifying an explicit list of files and avoid includes and
    excludes but I haven't been able to get to it yet.

Please read the rsync.1 man page section "EXCLUDE PATTERNS" carefully.

- Dave Dykstra




More information about the rsync mailing list