how to mirror cvs or svn with rsync

cpghost cpghost at cordula.ws
Sat Nov 14 20:16:49 UTC 2009


On Sat, Nov 14, 2009 at 09:38:11PM +0300, Nikolay Tychina wrote:
> Having a mirror accessible from our network for free would help users to get
> sources for free.
> Incoming traffic from Internet costs money, that's problem.

So you need to mirror /usr/src, and not the whole repository with
all its history, right?

What I do here is to csup /usr/src on one reference machine every now
and then, and then distribute that directory with rsync to all other
500+ machines inside.

Actually, I do a little bit more: I compile the sources on the reference
machine, and rsync /usr/obj to the other machines too, saving some 500+
buildworlds as well. I could nfs mount /usr/src and /usr/obj from the
reference server to the internal machines, but I have enough diskspace
there, and rsync is good enough for us.

You could also explore a similar mechanism w.r.t. /usr/ports, /usr/local,
/var/db/ports, /var/db/pkg etc..., if you want to save external bandwidth
downloading ports and distfiles, or CPU cycles compiling all this on your
internal machines. But this requires slightly more care, though it works
quite well too.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/


More information about the freebsd-stable mailing list