Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i have a subversion 1.6, it has one repo and mirrored repo. The mirrored repo is read only ofcourse. is there a way to commit and sync between these repos in both directions ?

share|improve this question
1  
...maybe I'm missing something, but if one of them is read-only why would you need bidirectional sync - surely the read-only one won't ever have any changes to distribute? –  nickgrim Jan 23 '13 at 12:06

3 Answers 3

up vote 0 down vote accepted

Have you looked at http://www.wandisco.com/subversion/replication? They do a whole line of products related to multi-site SVN, but they cost. Never tried them, myself, but that's where I ended up when I last looked for this.

You are going to get into a whole heap of problems trying to do it manually but, the closest I got was:

  1. Maintain a list of 'partner' SVN repositories at each site
  2. Add pre-commit hooks to both repos to 'lock' the other repos in the partner list:
    1. check for the existence of a semaphore file, bail if it exists
    2. create the semaphore file on each partner server
  3. Add post-commit hooks to both repos:
    1. check out the latest revision in a temporary folder working copy
    2. svn switch --relocate the working copy to each partner
    3. commit at the relocated repo
    4. remove the semaphore file
  4. Periodically verify each repo by using md5sum against an svnadmin dump
    1. Pick one to clobber the others, in the event of a checksum mismatch
    2. Take copious backups of all partners, in case someone complains about the clobber and you need a revision back

I'll save you the effort -- it didn't work very well. An absolute mare to setup and fraught with race conditions (you just cannot synchronise the semaphore file fast enough).

share|improve this answer
    
got to go on dvcs –  sp123 Jan 25 '13 at 11:55

Short answer: No

Longer answer: you can use "svnadmin dump-transfer dump- delete repo -recreate repo - svnadmin load" path, but it's nightmare

PS: DVCS seems as more natural solution in your case

share|improve this answer
    
+1 - it is a nightmare –  jimbobmcgee Jan 23 '13 at 12:46

Short answer: yes.

You can use VisualSVN Server's Multisite Repository Replication feature which allows bidirectional data replication between multiple repositories. The feature is based on VisualSVN Distributed File System technology which allows your slave repositories be writeable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.