rsync 3.0.4 under cygwin: problems with --exclude

Alessandro Toso alessandro.toso at gmail.com
Fri Aug 21 05:46:09 MDT 2009


Matt,
thanks a lot for your comment. As a matter of fact that was the problem. My
fault that I haven't read through the whole man page!
Cheers
Alessandro


On Fri, Aug 21, 2009 at 8:06 AM, Matt McCutchen <matt at mattmccutchen.net>wrote:

> On Tue, 2009-08-18 at 16:58 +0200, Alessandro Toso wrote:
> > I'm trying to backup a disk using rsync but I need to exclude some
> folder. I'm using rsync 3.0.4 under cygwin on a winxp machine.
> > The script that I use is:
> >
> > # ---------------------------------------------------------------- #
> > SRCDIR=/cygdrive/d
> > LOGDIR=/cygdrive/f
> > BCKDIR=/cygdrive/f/Backup
> >
> > rsync -auv --progress --delete --delete-excluded --log-file=$LOGDIR/`date
> +%Y%m%d`.log --exclude from='/cygdrive/f/.bak_exclude' $SRCDIR/ $BCKDIR
> > # ---------------------------------------------------------------- #
> >
> > and my file where there is the list of excluded folders looks like:
> >
> > # ---------------------------------------------------------------- #
> > - /cygdrive/d/Software/
> > - /cygdrive/d/Intel/
> > - /cygdrive/d/Sysprep2003/
> > - /cygdrive/d/RECYCLER/
> > # ---------------------------------------------------------------- #
> >
> > The problem is that rsync is not skipping these folders.
>
> Exclude patterns with a leading slash are interpreted from the root of
> the transfer, in this case /cygdrive/d/ .  So you should not include
> that prefix in your patterns.  See "ANCHORING INCLUDE/EXCLUDE PATTERNS"
> in the rsync man page for more details.
>
> --
> Matt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20090821/eb420510/attachment.html>


More information about the rsync mailing list