This is an old revision of the document!


The FreeBSD repository is currently mirrored at over 160 different locations around the world, to provide local, read-only copies of the repository in a more network friendly fashion, and to relieve the load on the master repository.

Subversion supports two mechanisms for mirroring the complete repository.

The first is to use the (new in Subversion 1.4) svnsync(1) tool. This tool requires public read-only access to the repository to mirror (which, for any of the public mirrors is likely to be already in place – thus, there is no requirement for a downstream mirror to communicate to an upstream mirror that it would like to start mirroring).

The target of this syncing (i.e., the mirror) can then itself be mirrored in to another repository. This allows us to set up a chain of mirrors.

XXX - At the time of writing it is not known how svnsync(1) interacts with [“VCSFeatureObliterate”]. More testing needs to be carried out.

An alternative approach is to use rsync. This approach only works with Subversion repositories that use the FS (as opposed to the BerkeleyDB) backend. If that constraint holds then the “svnadmin hotcopy” command can be run on the master repo to make a consistent snapshot of the repository. This snapshot can then be rsynced to the mirrors.

As with svnsync, a mirror that is kept up to date in this way can also be used as the source for another mirror.

Both approaches supports pull mirroring (the remote mirror initiates the update according to its own schedule), and push mirroring (the master initiates mirroring to all the mirrors it knows about). This would, for example, allow the master repo to push changes to all the top-tier mirrors after every single commit.

Replication is at the heart of all distributed VCS. It is as natural as creating a new branch and uses the same mechanism. Re-creating the current mirroring scheme is very simple, just allow remote machines to clone the reference repositories and offer read-only http-based access.

It is more efficient than rsync as it doesn't need to scan all files for modifications, it will simply get only the new changesets.

  • versioncontrol/mirroring.1158662479.txt.gz
  • Last modified: 2006/09/19 10:41
  • by OllivierRobert