Migrating a Subversion repository from Windows to Linux
Migrating subversion from a Windows installation to a Linux installation is not just copying the repository structure and files. But it is still quite easy. Here are the steps:
- Extract the repository data from Windows repository and store it into an OS independant format using the dump command:
svnadmin dump [repo location] > [dump file] ex: svnadmin dump /svn/MyProject > c:\temp\MyProject.dmp - Upload the exported file on the Linux system.
- Create a Subversion repository:
svnadmin create [repo location] - Adjust security settings on the new repository directory (if necessary).
- Restore the dump file into the new repository:
svnadmin load [repo location] < [dump file]
Here is an example of loading a dumped file into a Subversion installation for accessing through Apache2 and Ubuntu Server 7.04:
- create repository:
sudo svnadmin create /var/svn/MyProject - change owner:
sudo chown -R www-data:www-data /var/svn/MyProject - change security:
sudo chmod -R g+ws /var/svn/MyProject - Load dump file:
sudo svnadmin load /var/svn/MyProject < ~/MyProject.dmp