Migrating a Subversion repository from Windows to Linux

January 07th, 2008 | Category: How-To

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:

  1. 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
  2. Upload the exported file on the Linux system.
  3. Create a Subversion repository:
    svnadmin create [repo location]
  4. Adjust security settings on the new repository directory (if necessary).
  5. 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:

  1. create repository:
    sudo svnadmin create /var/svn/MyProject
  2. change owner:
    sudo chown -R www-data:www-data /var/svn/MyProject
  3. change security:
    sudo chmod -R g+ws /var/svn/MyProject
  4. Load dump file:
    sudo svnadmin load /var/svn/MyProject < ~/MyProject.dmp
No comments