Exclude all but include select folders

Adrian Marsh Adrian.Marsh at ubiquisys.com
Sat Jun 30 14:32:42 GMT 2007


Hi,

I'm trying to rsync up to some centos repositories, but I only want to
pull down the i386 and i386_64 folders with their RPMs, I've tried
various combinations and include and exclude, and I'm sure that the
below should work, but it doesn't...

SOURCE=rsync://mirror.stanford.edu/mirrors/centos
rsync -avrt $SOURCE --include=i386/ --include=*/ --exclude=*
/var/www/html/centos/
 
I thought that the exclude at the end would block everything except the
i386 contents, and according to the man page I'd need the include=*/ to
make sure child folders of the root were included.

Any ideas?

Thanks,

Adrian Marsh

 



More information about the rsync mailing list