Hello, On my windows xp machine, with cygwin, I run rsync to backup important files on another drive (samba share, mapped on h:). It works fine. I currently use the following command line: rsync -rtv --del --delete-excluded --progress --iconv=ISO-8859-1,UTF-8 --partial \ --exclude "/Videos/" \ --exclude "/Ma musique/" \ /cygdrive/d/Documents/ \ /cygdrive/h/Documents/ My problem is that I would like to synchronize a directory located inside "/Ma musique/", the one named "/Ma musique/iTunes/". I tried to use the following command, without success: rsync -rtv --del --delete-excluded --progress --iconv=ISO-8859-1,UTF-8 --partial \ --include "/Ma musique/iTunes/" \ --exclude "/Videos/" \ --exclude "/Ma musique/" \ /cygdrive/d/Documents/ \ /cygdrive/h/Documents/ Any hint about how to do this? Thanks a lot, -- Nicolas
On Thu, Aug 20, 2009 at 08:41:40PM +0200, Nicolas KOWALSKI wrote:> My problem is that I would like to synchronize a directory located > inside "/Ma musique/", the one named "/Ma musique/iTunes/".As you noticed, rsync will not synchronize anything whose parent dir gets excluded. To fix this, stop excluding the parent dir and instead exclude the content of the dir (but after any includes from the dir): --include="/Ma musique/iTunes/" --exclude="/Ma musique/*" ..wayne..
Wayne Davison <wayned at samba.org> writes:> On Thu, Aug 20, 2009 at 08:41:40PM +0200, Nicolas KOWALSKI wrote: >> My problem is that I would like to synchronize a directory located >> inside "/Ma musique/", the one named "/Ma musique/iTunes/". > > As you noticed, rsync will not synchronize anything whose parent dir > gets excluded. To fix this, stop excluding the parent dir and instead > exclude the content of the dir (but after any includes from the dir): > > --include="/Ma musique/iTunes/" --exclude="/Ma musique/*"This works perfectly! :-) Thanks a lot your explanation, -- Nicolas