Moving a SVN Server from Windows Home Server to Ubuntu – Part II: Moving the Repository

Once the subversion software has been installed (see previous post) it is not time to move at least one of my existing repositories to the new environment to test my processes.

First, we take a Backup…

The process I have decided on is a SVN Dump / Load Migration. Since I am the only user on the repository, I will not have an issue with intermittent updates into my repository, therefore, it should be straight forward…

On my Windows Server, I dump the repository using the svnadmin dump command.

Image 03 - Dumping the SVN RepositoryI also decided to place the dump file straight on a network drive so I should not have an issue accessing the file from the target platform.

…then we load the Data

But before we can load the data, we need to create a (new) target repository. My SVN Repo I am transferring is named LEGO and I want to keep the name:

sudo svnadmin create /srv/svn/lego
sudo chown -R www-data:subversion lego
sudo chmod -R g+rws lego

This creates the new repository and adjusts the permissions.

Image 04 - New Target RepositoryTo load the dump file, I first need to be able to access the QNAP location where it is stored. Which means I need a mount point if I don’t have one yet (e.g. a QNAP directory in /mnt) and I need to mount the network share (mind that on QNAP, it is a SAMBA share!).

sudo mount -t cifs -o username=[myuser],password=[mypasswd] //[QNAPIP]/[QNAPShare] /mnt/QNAP

Now, that does the trick… and here comes (hopefully) my loading of information into Subversion.

sudo svnadmin load /srv/svn/lego < /mnt/QNAP/LEGO/LEGO.dump

Send it… and watch the load proceed!

Image 05 - Load finished

Checking the Data is actually there…

But how can we tell it actually worked? Well – two ways: we can first look at the WebDAV Interface through the web browser.

Image 06 - The LEGO Repository through the WebDAV InterfaceAnd of course, I can simply checkout the full repository into the temporary drive using TortoiseSVN.

Image 07 - Through Windows ExplorerOne final method is to simply use the built-in Repository Browser TortoiseSVN brings with it:

Image 08- SVN Repo BrowserLooks like my repository has finally made it to its new (test) location. Which is good. Now, I can rest assured that I can not only properly backup my data – I can also recover it. And I can recover it “cross-system”, from a Windows-based environment to a Linux-based environment.

This entry was posted in Ubuntu and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *