including file from excluded directory

jw schultz jw at pegasys.ws
Wed Aug 20 08:41:39 EST 2003


On Tue, Aug 19, 2003 at 03:34:37PM -0500, Brandon Metcalf wrote:
> I'm trying to explicitly include a file that exists under a directory
> that I otherwise want excluded.  Here are my command and include list:
> 
>   rsync -e ssh -Cavz --delete --update \
>     --include-from=$HOME/.rsync.laptop . $DEST:
> 
> where $DEST contains the remote machine name and this is being run
> from the top of my home directory.  My include list is:
> 
>   + /.addressbook
>   + /.ICAClient
>   + /.calendar
>   + /.mailcap
>   + /.mime.types
>   + /.mozilla/bmetcalf/bookmarks.html
>   + /.fetchmailrc
>   + /.pinerc
>   + /.signature
>   + /.vimrc
>   + /.rsync.laptop
>   - /dead.letter
>   - /OpenOffice.org*
>   - /news
>   - /rpm
>   - /tmp
>   - /.*
> 
> .mozilla/bmetcalf/bookmarks.html refuses to transfer and if up I crank
> up verbosity, I see the the entire directory .mozilla is excluded
> because of the pattern /.* .  What's interesting is that all of the
> other files like .calendar transfer fine.  I've tried something like:
> 
>   + /.addressbook
>   + /.ICAClient
>   + /.calendar
>   + /.mailcap
>   + /.mime.types
>   + /.mozilla
>   + /.mozilla/bmetcalf/bookmarks.html
>   + /.fetchmailrc
>   + /.pinerc
>   + /.signature
>   + /.vimrc
>   + /.rsync.laptop
>   - /dead.letter
>   - /OpenOffice.org*
>   - /news
>   - /rpm
>   - /tmp
>   - /.*
> 
> But that includes everything under .mozilla.
> 
> What am I missing about rsync's algorithm?

Your exclude pattern doesn't match .mozilla/*
You might try changing it to /.**
You will also want to add an include pattern for
/.mozilla/bmetcalf/

I find a combination of unison and rsync is best for
laptop-desktop syncronization.  I use unison on the files
you are rsyncing and rsync to push the dot files into a
host-named subdirectory.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list