Move SVN repositories to remote server without moving SVN server, possible ?

Posted on 2012-04-03
Medium Priority
Last Modified: 2012-06-27
Hi Experts,

I was told I could move my svn repositories to my new datacenter and still keep my Visual SVN server at the same URL as it was, with remote repositories on the datacenter.

But when I read online ,googling about it, I hear that I have to set up a new server on the datacenter, which forces everyone using svn to relocate the source of their working copy. Something we would like to avoid.

What are your inputs and experiences on the subject ?

Using VisualSVN server 2.06 on windows.
Question by:maxalarie
  • 3
  • 2
  • 2
LVL 29

Expert Comment

ID: 37805398
I did use CVSNT for a long time.  As SVN is sad to be a logical successor of the CVS, I was thinking about switching to SVN.  When doing some more research, I have found Git.  But it was in time when Git was not ready for Windows.  Anyway, it contained a bridge to SVN (you can work with Git transparently in the mode when SVN is used as the server).  I did not know if Git is the right choice, but the SVN bridge was another argument for switching to SVN (with Git possibly used in the future).

To make it short, I have finally switched directly to Git.  Even though I did not like Linus Torvalds' way of insulting the other revision control systems, I have to admit that he was probably right.  I like the Git a lot (despite the name).

Why I am talking about Git in context of your question?  It was designed as a distributed RCS.  It means that you have much more freedom to place your repository wherever you need -- also temporarily.  After using it for a while, I really recommend to think about migration from SVN to Git.  It should be fairly easy (because of the bridge).  I only do not know if there is any integration layer for Visual Studio.  This is because I consider the built-in visual the "Git Gui" and the "gitk" to be very nice tools. (I personally have no need for the VS integration).
LVL 29

Expert Comment

ID: 37805744

Accepted Solution

rushtoshankar earned 2000 total points
ID: 37806117
You can have your visual svn server installed in one machine and you can have the repository in another machine/server which is accessible through network via shared folder.

In my office, I am running a local SVN server for my team and having the repository in our official server. I am doing this to avoid the manual backup of my repository from local machine to server every for safety.

Now regarding your question :-
Lets say you have two machines. MachineA (current svn server machine), MachineB (datacenter machine).

Till date you having the Visual SVN server and repository in MachineA. So the clients are accessing the repository using the following URL. https://MachineA/svn/RepoName/.

Here are some steps you can follow to have your repositories on the datacenter PC while running the svn server in the same machine.
- Share a folder from MachineB (\\MachineB\Repo, assume that UserX is the only user has the permission to this folder)
- Take a backup of the repository (probably from C:\Repositories on MachineA, copy the entire folder).
- Uninstall the Visual SVN server on Machine A.
- access the folder \\MachineB\Repo using UserX credentials or log into the MachineA using UserX credentials (i assume, UserX is a domain user). By doing the second option, you can avoid accessing the folder after every reboot for the visual svn server to work
- Install the visual svn server on MachineA, enter the folder name as \\MachineB\Repo for the repository.
- Stop the Visual SVN service
- Copy the backed up repository to \\MachineB\Repo
- Start the visual svn service.

Now you can access the same repository with the existing permission from any machine that was using the repository previously. (by using the SAME URL https://MachineA/svn/RepoName/)

Hope this helps. Feel free to reply if you have any questions.
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.


Author Comment

ID: 37806226
Thanks pepr, but I think I would prefer to keep on using SVN.

Wow, thanks rushtoshankar, I will definatly try that.
Both machines are on the domain.
I am not I get the thing about UserX...
Installing SVN Server with UserX with \\MachineB\repo as the repository (to which UserX is the only user that has access), will do so VisualSVN server will use UserX credentials everytime it tries to access \\MachineB\repo ?

This would be the exact setup I was looking for. Thanks again. I will award the points as soon as I test this...

Expert Comment

ID: 37806496
If the MachineA is logged in with UserX credentials, the VisualSVN will always use the UserX credential to access \\MachineB\Repo. This is windows behavior. If the MachineA is logged in with some other user credential, the VisualSVN can't access. You need to manually access the \\MachineB\Repo every time you login. (During logout, the temporary storage of the credentials will be wiped out).

Author Comment

ID: 37806504
Thanks :)

Author Closing Comment

ID: 37823836
It worked like a charm !
Thanks for your help !

Some pointers on what didn't go exactly as planned :

1) Check with which user the Server service runs, it is that user that you must allow through the share. It isn't automatic with the user used for installation

2) The use of network maps isn't supported, use "\\machine1\shareA" format when installing the server (There was a warning in the installation though)

Thanks again !

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question