Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating Subversion Repositories across servers

We're in the process of moving servers and one of the last items is moving over the svn repositories.

There are about 10 gigs of various svn repositories. They were created using this command: svnadmin create --fs-type fsfs

Server A(original) has svn 1.4 while Server B(target) has svn 1.6.

My thought was to use rsync to migrate the whole set of repositories (they are all in 1 folder on the server), but I am worried that some things might either not get migrated or I need special switches for rsync for this to work.

Most online tutorials only talk about moving 1 repository at a time, for example using svnadmin hotcopy, but I need to move about 100 or so all together. Is this the right way to go about it?

like image 342
Totomobile Avatar asked Oct 05 '11 19:10

Totomobile


1 Answers

Subversion's FSFS is pretty stable on doing copies and movements, even across different OSes. While mliebelt is correct about doing it via dump reload, it takes ages to move 10 GB!

That's why I would recommend the following procedure:

  1. Copy the repositories via filesystem to new server.
    e.g. $ scp -r /var/repos/ user@newServer:repos/

  2. Do an $ svnadmin upgrade to do an update on repository for 1.6 (this is optional, but highly recommended if you want to use 1.5/1.6 features like merge tracking, sparse checkouts, etc.)

  3. Do an $ svnadmin verify on each repository to verify all revisions are okay (You can do this on already running server).

By this procedure you need probably 10 to 100 times less time:

e.g. for dumping a repository it takes usually approx 1 GB per hour (largely depending on HD-speed), the dump files are much bigger than the repositories(in SVN 1.4!) So you have to move the larger file to the new server and do there an dump-load which also takes approx 1 hrs / GB. Compare this to a filesystem copy which usually is only limited by network connection (100 mbit approx. 10 MB / sec) or HD (approx 100 MB/sec), if you have GBit-LAN.

like image 56
Peter Parker Avatar answered Nov 09 '22 04:11

Peter Parker