2

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?

Mike Wild
  • 123
  • 1
  • 5

1 Answers1

2

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.

  • I'll definitely check out IRC, thanks for the suggestion. Could you perhaps suggest _why_ it might be better to do `svnadmin dump` (and copy hooks etc.) as opposed to `svnadmin hotcopy`? – Mike Wild Jun 28 '16 at 14:27
  • @mikeanthonywild updated ... it basically boils down to svn dump has less moving parts (read less things that could potentially go wrong). – CaffeineAddiction Jun 28 '16 at 14:32
  • The two servers will be running the same SVN version etc. I have just been advised on IRC that either method would be fine, provided the isn't written to during the transfer (ie. scheduled downtime). – Mike Wild Jun 28 '16 at 15:01
  • Yes, but is Apache setup exactly the same on both systems? Is the directory structure setup exactly the same on both systems? If yes to both then yah ... hotcopy would work just as well. – CaffeineAddiction Jun 28 '16 at 15:06
  • The directory structure within the master repos directory will be preserved, however the location of this master directory will change (as a result of shifting from Windows -> Linux). I am checking whether the Apache config will have changed. – Mike Wild Jun 28 '16 at 15:24
  • Apparently the migration also includes moving from UberSVN to Apache - so this could be the death knell for `svnadmin hotcopy`! – Mike Wild Jun 28 '16 at 15:30