SvennD
July 10, 2015

SVN server fail recovery

Posted on July 10, 2015  •  2 minutes  • 274 words  •  Suggest Changes

Oke, shoot me, I still love and use subversion (SVN) 🙂  So what happens when my lovely SVN server (my desktop :$ ) breaks down ? All hell breaks lose! (before you start)

Well that’s a bit cheesy, since actually the hard drive still lived and all the checkouts on the servers still are up-to-date and the latest release is pretty much the most important one -for me-. Though how do you fix a SVN once the mother-system gives up … well I found a way, perhaps not the best or cutest way; but hey, you’re here to find answers aren’t you ?

First I needed to install svn, (new machine right)

sudo apt-get install subversion

after that, I mounted the old disk;

sudo mkdir /media/data
sudo mount /dev/dbc1 /media/data

Then you attempt to take a dump; svn dump that is.

sudo svnadmin dump /media/data/var/www/svn/myreponame > ~/repo.dump

Then I created a new repo, I have no idea where the best place is to locate a repo, so I chose /var/svnrepo for a change; adapt to your own wishes. (note : don’t store it somewhere public obv.)

sudo mkdir -p /var/svnrepo
sudo chown $USER:$USER /var/svnrepo
svnadmin create yournewrepo

Once we are here, you should see a directory in /var/svnrepo/yournewrepo so now we can start loading your dump in. (This does sound wrong)

svnadmin load yournewrepo < ~/repo.dump

This last process takes quite a time to finish, but perhaps this is my mistake, since at one time in development, I thought huge blocks of raw data to SVN was a good idea. My dump was 5,5 Gb.

Hope it helps you save your precious SVN repo!

 

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper