A computer holding svn repositories crashed. Detailed investigation suggested it was a motherboard failure.
Task: Move svn repositories to a different computer and setup http access to svn repositories.
1. Used CiT 3.5 inch USB 2.0 SATA and IDE HDD Enclosure to convert the internal hard drive into an external hard drive.
2. copied the parent folder holding all repositories to a new server (e.g. ~/work/svn-repos).
3. sudo chown -R www-data:admin1 ~/work/svn-repos
here, www-data is the apache2 user on ubuntu and admin1 is the group with rights to read write into svn-repos. You might have a different group here.
# install apache, svn and a module that enables communication between apache and svn repositories
4. sudo apt-get install apache2 subversion libapache2-svn
# edit the apache configuration to tell where to find repositories
5. sudo nano /etc/apache2/httpd.conf
—–
# load the two modules needed for communication between apache and svn
# loading these modules allows displaying svn repo contents
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
<Location /svn>
DAV svn
# Automatically map any “/svn/foo” URL to repository /var/svn/foo
SVNParentPath /home/admin1/work/svn-repos
# Authentication: Basic
AuthName “Subversion repository”
AuthType Basic
AuthUserFile /home/admin1/work/svn-repos/htpasswd
# Authorization: Authenticated users only
Require valid-user
</Location>
—-
# restart apache2 server
6. sudo service apache2 restart
Ofcourse, you might have existing repositories checked out on client machines. If your access URLs have not changed, you don’t need to do anything and your client machines will work just fine. But incase if you have a different URL, use the following command in top-level folder of every repository you’ve checked out on your client machines.
svn switch –relocate <oldURL> <newURL> .