exclude problem
John Van Essen
vanes002 at umn.edu
Mon Mar 21 22:05:23 GMT 2005
On Mon, 21 Mar 2005, Lars Nordin <lnordin at noblesys.com> wrote:
> I have looked on the mailing lists and through rsync documentation but those
> still haven't solved my problem. I may be calling rsync incorrectly but the
> problem I have is that the exclude file seems to be ignored. My final goal is
> to replicate an entire host, excluding some files that contain specific IP,
> hostname configuration things. I'm trying to start small by mirroring a
> directory first and then later I will just specify "/".
<snip>
> Here is the command line I'm using.
>
> rsync -avv -n --delete --exclude-from=sys_dont_replicate.list -e ssh
> root at patron:/etc/ /etc
Your exclude-from file is set up for a root-level rsync. But you are
testing from top-level of /etc, which means all your exclude paths are
rooted at /etc/, not at /. That's why they don't match (e.g. rsync is
testing for /etc/etc/lilo.conf instead of /etc/lilo.conf).
The easiest 'fix' for temporary testing is to use the root directory like
you will be doing later, include /etc, and exclude other top-level dirs:
rsync -avv -n --delete --include=/etc --exclude=/* --exclude-from=sys_dont_replicate.list
-e ssh root at patron:/ /
Then just remove the extra --include and --exclude when you are ready to
test the whole hierarchy.
--
John Van Essen Univ of Minn. Alumnus <vanes002 at umn.edu>
More information about the rsync
mailing list