Mirroring a Subversion Repository
As of version 1.4, Subversion provides an “svnsync” utility that may be used to create a mirror of a repository. It should be used only for read-only mirrors — it will break if any changes are committed in the target repository that were not made in the source repository. This is primarily useful for backup purposes, or for creating a local mirror used by clients that have no intention of checking in changes, as it is not a trivial operation to check out from one repository and commit to another and it requires manipulation of the mirror repository.
To create a new Subversion repository that is a mirror of an existing repository, do the following:
- Create a new filesystem directory that will be used to hold the mirror, like:
$ mkdir /mirror/subversion
- Use the svnadmin utility to create a new repository within that directory, like:
$ svnadmin create /mirror/subversion/OpenDS
- The mirror repository must be configured to allow revision properties, and it should only allow those changes by the “svnsync” user, which can be done by creating a “hooks/pre-revprop-change” file in that repository with the execute permission set and with the following contents:
#!/bin/sh if [ "$3" = "guest" ]; then exit 0; fi echo "Only the guest user may edit revision properties through svnsync" >&2 exit 1
- Initialize the mirror repository using the “svnsync init” command, like:
svnsync init --username guest file:///mirror/subversion/OpenDS https://opends.dev.java.net/svn/opends
- Use the “svnsync sync” command to populate the mirror repository, like:
svnsync sync file:///mirror/subversion/OpenDS
- To keep the mirror up to date, periodically re-issue the above “svnsync sync” command (e.g., using a cron job).
See http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt
for more information on the svnsync utility.
<!–
–>
OpenDS Wiki Home
Project Site Links
Wiki Contributor Resources
- Join the OpenDS Wiki

- Creating a Page
- Text Formatting Rules

- Text Formatting Tips
- Style Suggestions
- Wiki Etiquette
- Contributors’ and Reusers’ Rights and Responsibilities
- What is Wiki?

- JSPWiki.org Sandbox

- To Do
Wiki Info
Page Info Print Friendly My Prefs Log in
This page (revision-2) last changed on 20:56 05-May-2007 by NeilWilson.
What Links Here
JSPWiki v2.4.102
Page Info Print Friendly My Prefs Log in
This page (revision-2) last changed on 20:56 05-May-2007 by NeilWilson.
Did This Article Answer Your Questions?If not, please click “Add Comment”
to enter topic requests, example requests, or any general (constructive) comments about this article.
By any use of this Wiki, you agree to be bound by this website’s Terms of Use. Copyright 1994-2007 Sun Microsystems, Inc.
![[RSS]](https://www.opends.org/wiki//images/xml.png)