views:

94

answers:

4

We would like to merge two of our servers together and in order to do that we would need to install SVN on the "new" server and then move over all of our repositories that we have set up on our "old" server.

Is this an easy operation to do? Possibly using the "Relocate" option that TortoiseSVN provides? What is the best way to do it?

Would this be a good time to re-organize how the repo is set up as well?

A: 

Would this be a good time to re-organize how the repo is set up as well?

Perfect time to do this, since you'll have to take your repository down anyway while you migrate it to the new server.

Bernard
What task do you have in mind when re-organizing?
zellus
The repo currently does not have the branch/trunk/tag structure
Joe Philllips
+7  A: 

You can migrate a repository using the svnadmin dump function. On the SVN server, type svnadmin dump /absolute/path/to/the/repo > /tmp/repo.svndump. This will export the entire repository to a text file in the system's temporary directory and name it "repo.svndump". You might want to compress that file before transferring it to the new server.

Once you have the repo exported, you can then transfer the dump file to the new server and import it like so: svnadmin load /absolute/path/to/the/**new**/repo < repo.svndump.

See 'svnadmin dump' and 'svnadmin load' for more information.

After dumping the repository and loading it on the new server you would use the --relocate command to switch your local copy to the new server.

Caution: If your repositories use any externals then you will have some problems. See my question on Server Fault for details about this.

jsumners
+1  A: 

If the new server uses the same operating system you can just copy the entire repository folder to the new server. No need to dump and reload it.

The relocate command allows you to point your working copy to the new server i.e. it does not help you to move the repository, it just saves you from doing a fresh checkout.

Externals can be a problem but do not have to be. If the external repository was on the same server then you probably specified the external with a relative URL. If the new server uses the same structure then everything should work just fine.

Stefan Egli
If you use the Berkeley database backend, which used to be the default, then you absolutely *MUST* do the dump-and-restore appraoch, because otherwise the pain just isn't worth it.
Arafangion
you are absolutely right!
Stefan Egli
A: 

I'm going to be doing the same thing soon (new server hardware, the old server is at end-of-life) and will take the opportunity to move to VisualSVN server. We never figured out how to do LDAP authentication properly, VisualSVN "just works" in our environment, so this will be a nice upgrade for us. http://www.visualsvn.com/server/ (Windows Server2003 to Server2008 migration, btw)

Chris Thornton
Interesting point. LDAP would actually be helpful as well.
Joe Philllips