Subversive Migration

I recently installed Ubuntu 8.04 server edition on one of my old PCs. It’s the PC I retired last October and after you see the specs: Yes, I did use that up until last year. Here are the specs:

CPU: AMD Duron 750MHz
RAM: 512MB SD
HDD: 120GB (though that one died and has been replaced with a 40GB)

It’s working great as a server. I’ve got Postfix mailserver set up on it, LAMP, Samba, and Subversion. I understand a server of those specs would not normally run all those at once in a production environment, but Hey! it’s just running in my bedroom.

I figured I may as well migrate the svn (subversion) repositories that are hosted on my current PC over to my server. You know, because that’s what a server does, right?

Here‘s what I did:

First, install and configure subversion on the machine you are migrating your repositories to. I follow the Ubuntu community subversion document when I want to do that. When that is done, create new (empty) repositories for each of the repos you are migrating over. I’ll assume that if all you’re interested in knowing is how to migrate svn from one PC to another that you do not need help setting up repositories. Use the previously linked guide for those steps.

Second, back up the repositories on the machine they are currently sitting on. There’s a tool meant for this so don’t just copy the directories over.

From your svn directory:

svnadmin dump myrepos > dumpfile

Do that with all of your repositories. “myrepos” is the name of your repository and “dumpfile” is the name of your backup. I shouldn’t have to say to give “dumpfile” a different name for each repo.

Third, copy those dumpfiles over to the machine you are migrating to. Your home directory works just fine. When all your dumpfiles have been copied you just need to load them into your server’s svn.

From within the svn directory:

svnadmin load newrepos < path/to/copied/dumpfile

Do that for each of your repositories and you are done. Now might be a good time to test that the repositories correctly loaded before you delete them from the original machine.

Leave a Reply

 

Staypressed theme by Themocracy