13

I have a codebase located in Europe and access this codebase from Asia. Codebase is substantially huge, downloading the whole codebase (which is required sometimes) becomes a pain.

I wanted to know whether anything like this.

I want a solution that "I will have a svn server locally which will sync with the main svn and serve my team as the svn is locally hosted."

Thanks in advance
Munim

Abdul Munim
  • 18,869
  • 8
  • 52
  • 61

4 Answers4

13

You can also try a write-through-proxy which is supported since SVN 1.5 and works fine.

With this setup you have a master and a slave repository.

The slave repo acts as a local read cache while commits will be proxied to your master server and synced back.

This solution comes with subversion / apache.

See this svndevelopers blog for more details. Or the superb SVN book, or last but not least the subtrain admin training presentations

Juuso Ohtonen
  • 8,826
  • 9
  • 65
  • 98
Peter Parker
  • 29,093
  • 5
  • 52
  • 80
  • This is exactly what I want. Can you give me detail how to do it? – Abdul Munim Feb 19 '10 at 06:21
  • It is not a difficult task, but you have to do a lot of things (apache configs and subversion hooks) You can use the links as references (I added two more references) – Peter Parker Feb 20 '10 at 02:20
  • is there an updated link that works for the SVN developer blog? It seems like they have some authentication required now (not obvious how to register or anything like that) – Adam Feb 10 '11 at 15:38
  • Updated link vor svn 1.7 redbook: http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.writethruproxy – Eduard Wirch Jun 13 '13 at 05:45
  • Updated link for the blog post: http://blogs.collab.net/subversion/yesterday-at-th – Eduard Wirch Jun 13 '13 at 05:45
3

Here is a pretty good article on how to set this up:

http://wordaligned.org/articles/how-to-mirror-a-subversion-repository

The general idea is to use svnadmin hotcopy to do the copy without down time, perhaps triggered by a post-commit hook, or on a timer.

Another option, discussed here:

http://blogs.collab.net/subversion/2007/08/mirroring-repos/

Is to use SVN sync to do a sync, rather than a copy, using the svnsync synchronize command.

quamrana
  • 37,849
  • 12
  • 53
  • 71
John Gietzen
  • 48,783
  • 32
  • 145
  • 190
  • Sorry! This is the first post on Google when you search with **Mirror SVN Repository**. I have edited the question, please check the question again. I am sure you can help me on this. – Abdul Munim Feb 18 '10 at 05:56
  • Ok, `svnsync` is almost definitely your way to go then. You can set up a post-commit hook that will do the syncing for you. That second link should give you a pretty good walk-through. – John Gietzen Feb 18 '10 at 06:00
  • Perhaps `svnsync` could be a solution, but I want some that is similar to `TFS Proxy`. – Abdul Munim Feb 18 '10 at 06:09
  • @Munim: I don't think that there is a caching proxy server for SVN. I think `svnsync` is the closest you are going to get. You can get reasonably close using scvsync, tho. – John Gietzen Feb 18 '10 at 14:35
  • There is the write-through proxy mechanism which is build into svn1.5(however with some apache magic, you can get it running on svn 1.4: http://www.rvo-consulting.com/2008/02/21/subversion-diy-write-through-proxy/ ) – Peter Parker Feb 19 '10 at 01:39
0

Besides the svnsync, you can try the commercial solution from Wandisco.

Atempcode
  • 397
  • 1
  • 4
0

Try Multisite Repository Replication with VisualSVN Server. That's exactly what you were looking for then.

Multisite Repository Replication enables classic master/slave replication architecture which allows you to setup a master repository at your main codebase location in Europe with multiple slaves at other locations.

In contrast to standard write-through proxy solution, in Multisite Repository Replication feature

  • master and slave repository looks and acts just like a regular writeable Subversion repository,

  • the replication between master ans slaves is performed automatically and transparently,

  • supports advanced authentication mechanisms,

  • It's easy to setup, works out-of-the-box with minimal configuration via VisualSVN Server Manager MMC console.

Learn more at http://www.visualsvn.com/support/topic/00068/

bahrep
  • 29,961
  • 12
  • 103
  • 150
  • thanks. This will definitely help people stopping by and still using SVN. I guess git addressed most of the svn problems and people moving towards it. – Abdul Munim Oct 19 '14 at 13:51