As now I’m using Netbeans, I had issues with key based authentication for CVS project in Netbeans. That’s why I decide to import my CVS project to SVN. At some point, as the SVN repository was on my own personal computer, I decide to move it to a public server I had, but only allow SSH access to it. So here is the procedure to move a SVN repository to another SVN server, and only allow svn+ssh access ( no webdav, no network svnserve access ) under Mandriva.

  1. On your old SVN server, you have to dump the entire SVN repository :
    svnadmin dump /path/to/your/repository > /tmp/repository.svn_dump
  2. Now copy the dump file somewhere on the new SVN server. You may want to use scp if your SSH key based authentication is working correctly. For example :
    scp /tmp/repository.svn_dump user@new-svn-server:/tmp
  3. Once done, you may want to delete the dump file on the old server and eventually delete also the old SVN repo
  4. On your new server, install the SVN server package and its associated tools :
    urpmi subversion-server subversion-tools
  5. check that svnserve is not started at boot by xinetd. For this check /etc/xinetd.d/svnserve configuration file and check that you have disable = yes as follows :
    # default: off
    # description: svnserve is the server part of Subversion.
    service svnserve
    {
     disable             = yes
     port                = 3690
     socket_type         = stream
     protocol            = tcp
     wait                = no
     user                = svn
     server              = /usr/bin/svnserve
     server_args         = -i -r /var/lib/svn/repositories
    }
  6. Now create the repository tree on the new server :
    svnadmin create /var/lib/svn/repositories/
  7. Import the dumped repository file in the new SVN repository :
    svnadmin load /var/lib/svn/repositories/ < /tmp/repository.svn_dump
  8. If the importation is successful, now you should ensure that the users connecting with SSH will have write access to the repository. For this add the users to the svn group :
    usermod -G svn -a user
  9. Now add a default ACL for the group to the repository giving read, write and execute ( rwX ) rights to all members of the svn group :
    setfacl -R -m d:g:svn:rwX /var/lib/svn/repositories/
  10. Check that from a remote computer you can list the content of the repository :
    svn list svn+ssh://user@new-svn-server/var/lib/svn/repositories

Happy coding with Subversion :)

Ressources :