1

I need to migrate an SVN server with numerous repos to a new server. The old server was built on a legacy OS that has problems, so I decided to rebuild it.

I know only some basics on SVN usage, and I am not sure if I need to take the dump/load route or if I can use svnsync to migrate to a new server.

I keep finding references for svnsync being used for 'read only' mirrors. That is not exactly what I want. I am trying to migrate all data from existing SVN server A to newly created SVN server B.

Once this is finished, server A will disappear and all SVN users will be using server B.

So far I have the new SVN server up with the (empty) repos created.

1

Just posting for anyone else with the same question. The question comes down to whether svnsync is only for mirrors or can be used for migration.

Quoting Dave Anderson's input from google groups:


It can be used to perform migration, and it is the only way to perform migration to Google Code. The warning in the Subversion book should be read as: "If you want read-only mirrors, make sure that you never commit anything to it manually, otherwise svnsync will no longer be able to synchronize from the master repository".

But, internally, svnsync is a trivial program: it requests a stream of revisions from one server, and replays those revisions in another server. As long as the target server doesn't diverge (ie. doesn't have any commits not in the source), then svnsync can be run incrementally to stay in sync. But you can also just run it once, to sync up two repositories, then throw away the original and start using the synced copy.

As for the difference between dump/load and svnsync, the basic difference is that svnsync works entirely through the public server API, whereas dump/load operates directly on repository files. Both mechanisms get you exactly the same data, but implementing only svnsync is much simpler for us. Implementing dump/load would require additional development time and resources for not much benefit. Historically, dump/load was originally easier to have, but over time the need for a public way to do incremental dump/load became obvious, and svnsync came into existence.

So, bottom line: yes, use svnsync. If you follow the documentation, consider Google Code to be your "read only mirror". Once the synchronization is complete, just delete (or archive and backup :) your local repository, and start using the Google Code repository as usual.

Hope this helps, - Dave

  • Thanks for posting an answer! Remember that you can (and indeed should) accept your own answer. – terdon May 21 '15 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.