Svn – Using svnadmin hotcopy for repository migration

migrationsvn

I need to migrate a very large number of repositories to a remote server and am wondering whether svnadmin dump or svnadmin hotcopy is the right tool for the job.

The SVN versions would be the same for both servers, however most of the repositories are currently stored on a Windows share, whereas the new server will be Linux-based. All repositories are currently using the FSFS backend.

The SVN book proposes that svnadmin dump / svnadmin create + svnadmin load be used for migrations. I am leaning this way because:

  1. It seems like the widely-recommended method
  2. It would ensure there were no compatibility issues migrating from Windows to Linux

However it seems like there are significant advantages to the svnadmin hotcopy approach, namely:

  1. Vastly reduced code complexity (can do the whole lot with one command, whereas the aforementioned alternative requires several discrete steps.
  2. It is a lot quicker – a definite plus given 100GB+ of data needs migrating
  3. Hooks and repository config also get transferred

I've done a quick experiment using the svnadmin hotcopy workflow which seems to work fine – but I want to avoid little edge-cases which might creep up later.

To that effect, can anyone offer any significant reasons why svnadmin hotcopy shouldn't be used for repository migrations?

Best Answer

svn dump repo > repo.dump Also, the .dump file is highly compressible ... it is recommended that you tar.gz it before moving it to the new server.

hotcopy would be useful if you where maintaining a live backup that is an exact clone of your current machine ... if you are rebuilding a new server it is most likely going to be better to copy the hooks and setup the configuration by hand.

  • dump is version independent. This means that the exported copy can be used by any version of svn.
  • hotcopy makes a direct copy of the repository. It is fast, but it keeps information about the underlying file system etc. The server where the copy is imported needs to be the same version, have the same config etc.

It might also be worth while hitting up #svn on freenode irc ... pretty active community with solid advice.