Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving a Subversion repository to another server

I have a server that hosts my Subversion code base. That server is currently a Windows Server 2003 box, and my IT administrator wants to update it to Windows Server 2008.

This means that I'm going to need to move my Subversion repository while the server gets built up and was wondering what the best practices are for moving the repository to a new server.

It seems like, looking online, the recommended way is to use:

svnadmin dump /path/to/repository > repository-name.dmp 

And then use:

svnadmin create repository-name svnadmin load repository-name< repository-name.dmp 

To import the repository.

Does the method above seem like the best approach?

like image 568
Ryan Smith Avatar asked Dec 11 '08 20:12

Ryan Smith


People also ask

How do I export and import SVN repository?

In the main menu, select VCS | Browse VCS Repository | Browse Subversion Repository to open the SVN Repositories tool window. Right-click a directory you want to export and choose Export from the context menu. In the Select Path dialog that opens, specify the destination directory and click OK.

How do I clone a Subversion repository?

You can clone from a SVN repo using the git svn clone command. -s = If your SVN repo follows standard naming convention where main source is in “trunk”, branches are created in “branches”. Here we are telling git svn that trunk is the “trunk” directory, maintenance is the “branches” directory etc.


1 Answers

Yes, dumping and loading the repository is a way to go. Copying the repository folder directly is a viable option if, and only if, you are certain nobody will be accessing the repository while the copy process is in progress (or you can do a "hot copy" of the repository, which can handle these cases in a safe manner).

You will also need to either re-checkout all your working copies, or use the svn switch command, which merely rewrites URLs. A more convenient way is to use TortoiseSVN's Relocate command, which reduces the risk of making a mistake during the relocation process.

like image 185
petr k. Avatar answered Sep 20 '22 12:09

petr k.