I want to rsync only a small part of a directory tree. I've set up an exclude and an include file: exclude holds: /* include holds: /iso/1.5.*/i386 I am calling rsync using rsync -avz --include-from="include" --exclude-from="exclude" ftp3.sourceforge.net::/netbsd/iso iso/ but nothing happens. No files transfered. But I would expect rsync to transfer files: /iso/1.5.1/i386cd.iso /iso/1.5.1/i386pkg1.iso /iso/1.5.1/i386pkg2.iso /iso/1.5.1/i386pkg3.iso /iso/1.5.2/i386cd.iso /iso/1.5.1/i386pkg1.iso /iso/1.5.1/i386pkg2.iso /iso/1.5.1/i386pkg3.iso Can one explane why rsync doesn't transfer there files and point me to some error in my include/exclude files? Thanks in advance! -- Thomas
On Tue, 13 Nov 2001, Thomas Schweikle wrote:> I am calling rsync using > > rsync -avz --include-from="include" --exclude-from="exclude" > ftp3.sourceforge.net::/netbsd/iso iso/Looks like you didn't copy that command exactly, because rsync would fail with a syntax error due to the '/' before the netbsd module name. Also, you're creating an iso dir inside your local iso dir, which is probably not what you want. With the include/exclude file Dave gave you, you'd need to run this command (changing "iso/" into "."): rsync -avz --include-from=foo ftp3.sourceforge.net::netbsd/iso . However, I'd suggest one a little simpler: add a trailing slash to the root directory you're requesting and you can leave off the references to it (and put the data wherever you like, even if the directory isn't named "iso"). You would run this command: rsync -avz --include-from=foo ftp3.sourceforge.net::netbsd/iso/ myiso And put this into "foo": + /1.5.*/ + /1.5.*/i386* - * You'll note I also used a trailing slash for the directory include since I don't want any files that match to be included (there are none here, but it's a good general principle). ..wayne..
Dave Dykstra <dwd@bell-labs.com> on 13.11.2001 17:41:22 An: Thomas Schweikle <tschweikle@fiducia.de>, rsync@lists.samba.org Kopie: Thema: Re: rsync exclude/include> On Tue, Nov 13, 2001 at 10:00:59AM -0600, Dave Dykstra wrote: > ... >> A simplification is this: >> >> + /iso >> + /iso/1.5.* >> + /iso/1.5.*/i386* >> - * >> >> because if you don't have the slash preceding the exclude "*" it >> applies at all levels. > > Wait, if i386* matches directories and not just files you'll need > > + /iso > + /iso/1.5.* > + /iso/1.5.*/i386** > - * > > so that it will include all files below the i386* directories. > Any double asterisk in a pattern tells the matching routine to > go beyond slashes.No. No solution. No files. Nothing. Definitively something wrong with these matching routines. -- Thomas
Dave Dykstra <dwd@bell-labs.com> on 15.11.2001 17:57:08 An: Thomas Schweikle <tschweikle@fiducia.de> Kopie: rsync@lists.samba.org Thema: Re: rsync exclude/include On Thu, Nov 15, 2001 at 05:17:32PM +0100, Thomas Schweikle wrote: [...]> + /1.5.* > + /1.5.*/i386** > - * > > I just ran that list against "ftp3.sourceforge.net::netbsd/iso/" > and it worked.The tip lookung at http://lists.samba.org/pipermail/rsync/1999-October/001440.html was what I needed. Now since it is more clear what rsync was trying to do, I got it working. Thanks a lot! -- Thomas
Maybe Matching Threads
- rsync exclude/include [FIDUCIA virengepr?ft - ohne Gew?hr, da? alle bekannten Viren und deren Varianten erkannt wurden.]
- rsync exclude/include [FIDUCIA virengeprüft - ohne Gewähr, daß alle bekannten Viren und deren Varianten erkannt wurden.]
- rsync error: some files could not be transferred (code 23) at main.c(1045)
- wine and window managers
- exclude this file #notes#