3

We have an SVN server with around 55 GB of code, and a second, brand spanking new SVN server which currently serves one project.

I'd like to move all of the content on the old server to the new server, to decommission the former.

The old server has 73 repositories on it.

Can I svnadmin dump /usr/local/subversion/* and then import that, or do I need to do it repo by repo?

1
  • Is the goal to have 73-74 repositories on the new server, or are you trying to merge them? Also, what version of SVN is in use on the old server vs the new server? Jun 13, 2014 at 16:53

1 Answer 1

5

In most cases, you can simply copy the repository directories from the old server to the new server. Just be careful not to overwrite the repository that already exists on the new server! If necessary, update your config files to reference the new repositories (this will depend on your specific server config).

You should shut down the Apache/svnserve processes while you are copying the directories so nothing alters the contents during the copy. If this is not desirable, you can use svnadmin hotcopy to copy the repo while it is "live". For more info, refer to the SVN book: http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html

In general, you should only have to do an svnadmin dump/load cycle in the following cases:

  1. You have a pre-SVN 1.0 repository and you want to upgrade it to work with a modern version.

  2. The project(s) committed to the existing repository made use of svn:externals which referenced the old repository URL. In that case you need to use something like svndumptool to do a regex on the dumpfile to fix the URLs before loading it on the new server. (In newer versions of SVN, you can use wildcards to fix this, but you may have to do a dump/load to fix up old revs.)

  3. You are converting repository formats (e.g. from BDB to FSFS). Note that if you have a BDB repository, you really should consider migrating to FSFS, since BDB is deprecated as of SVN 1.8.

  4. Your repository was created with an older version of SVN and you want to take advantage of the newer performance and deltification features found in the latest SVN (e.g. SVN 1.6 added representation sharing).

Note thats cases #1 & 2 are pretty much the only time you actually need to do a dump/load cycle.

Also, keep in mind that an SVN dump file will not contain the repository hook scripts, server side config files, or locks from the old repository. It will only contain versioned data. You will need to transfer those manually after the new repository is loaded.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .