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 <[email protected]>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 > >
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
