Ressources documentaires pour Mandriva Linux et les Logiciels Libres
Importing a SVN repository from one server to another one
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.
- On your old SVN server, you have to dump the entire SVN repository :
svnadmin dump /path/to/your/repository > /tmp/repository.svn_dump
- 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
- Once done, you may want to delete the dump file on the old server and eventually delete also the old SVN repo
- On your new server, install the SVN server package and its associated tools :
urpmi subversion-server subversion-tools
- 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 } - Now create the repository tree on the new server :
svnadmin create /var/lib/svn/repositories/
- Import the dumped repository file in the new SVN repository :
svnadmin load /var/lib/svn/repositories/ < /tmp/repository.svn_dump
- 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
- 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/
- 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 :
- Converting a CVS repository to a SVN one with cvs2svn : http://cvs2svn.tigris.org/cvs2svn.html
- Moving a SVN repository to another server : http://www.petefreitag.com/item/665.cfm
- SVN cheat sheet : http://www.abbeyworkshop.com/howto/misc/svn01/
- How to manage different projects under SVN : http://subversion.apache.org/faq.html#multi-proj
- SVN reference book : http://svnbook.red-bean.com/en/1.1/ch01s07.html
- French howto about SVN usage : http://wiki.mandriva.com/fr/subversion
- How to use SVN with Eclipse : http://www.ibm.com/developerworks/opensource/library/os-ecl-subversion/
- Guided tour of subversion with Netbeans : http://netbeans.org/kb/docs/ide/subversion.html
- SVN+SSH usage with Netbeans : http://wiki.netbeans.org/FaqSubversionSSH
- Why you should use branches with SVN : http://webmonkeyswithlaserbeams.wordpress.com/2008/08/26/subversion-branch-management/
- Best practices for managing releases with Subversion : http://www.karlkatzke.com/best-practices-for-managing-releases-with-subversion/
- Creating and managing releases branches : http://docs.jboss.org/process-guide/en/html/svn-admin.html
- Notes on branches management with subversion : http://soniahamilton.wordpress.com/2009/02/24/notes-on-branch-management-wit-subversion/
| Print article | This entry was posted by darkmind on 13/07/2010 at 20:29, and is filed under Administration, Dev. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |