[CentOS-mirror] Best Practice to sync only certain versions

Mon Jun 23 17:32:36 UTC 2008
Tobias Offermann <to at hosteurope.de>

Todd Reed wrote:
> We are considering only syncing 4 & 5 on our internal mirror.  Below is 
> a script that was on the CentOS Mirror site.  Would I be able to use 
> this script to sync only 4 or 5?  Or, is there a better way to 
> accomplish this?

depending on your needs, maybe a single rsync might fit better, as
i needed it: (it's only for i386, it should be simple to extend this..)

rsync -av	\
	rsync://mirror.server.example.com/centos.org/		\
	/local/path/to/centos.org/				\
	--prune-empty-dirs 					\
	--delete --delete-after --delete-excluded		\
	--include=/4						\
	--include=/4*/						\
	--include=/5/						\
	--include=/5/os						\
	--include=/5/updates					\
	--include=/5*/						\
	--exclude=/*						\
	--include='*/'						\
	--include=**/os/i386/CentOS**				\
	--include=**/updates/i386/RPMS/*			\

but your question still remains: is there a better way..? (or a
shorter include/exclude?) :)