A little bit ago I needed to migrate all my subversion repositories over to my fresh new Ubuntu server. I personally manage the server so it also gets interesting trying to do upgrade Ubuntu by installing a fresh new install.
Migrating to another server
Now let’s migrate to a new server. Just need to export it and then create a repository and then import it.
Export
svnadmin dump REPOS_PATH > export.txt
Import
First things first. Make sure you have your users specified. Here is a quick tip on adding new users for your subversion system:
htpasswd -b /svn/users/passwords username password
or
htpasswd /svn/users/passwords username
Create New Repository
svnadmin create /svn/repos/test
chown -R apache.apache /svn/repos/test
Quick Setup
We just need to configure Apache to point to the correct subversion location. On Ubuntu I have the following specified in my apache.conf file:
<Location /svn/thoughtsway>
DAV svn
SVNPath /home/svn/location_of_svn_repository
AuthType Basic
AuthName “<NAME_OF_YOUR_SERVER> Subversion System”
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Resources
- http://www.ferdychristant.com/blog/articles/DOMM-6NFJ6J
- http://www.subversionary.org/howto/setting-up-a-server-on-fedora-core-4
- http://www.polarion.org/index.php?page=overview&project=fasttrack