Feb  09
20

How to Migrate an SVN repository

Published on February 20th, 2009
Author: Michele

Sometime we need to migrate one ore more Subversion (SVN) repositories from a machine to another. In this short guide, we will see how to migrate an SVN repository from a machine “A” to a machine “B”.

  1. Login to machine “A” using SSH, or if you have a physical access to the machine “A” open the command shell
  2. Enter the following command:
    svnadmin dump /path/to/repository > myrepository.dump

    where “/path/to/repository” is the full path to the SVN repository to migrate and“myrepository.dump” is the name of the file which will contain the repository dump

  3. Transfer “myrepository.dump” file to machine “B” (e.g., using SCP or a FTP client) putting the file into “/path/to/new/repository”, where “/path/to/new/repository” is the full path of the SVN repository on the machine “B”
  4. Login to machine “A” using SSH, or if you have a physical access to the machine “A” open the command shell
  5. Enter the following commands:
    cd /path/to/new/repository
    svnadmin load nuovorepository < myrepository.dump

    where “nuovorepository” is the name of the SVN repository on the macchina “B” (which must be previously created) and “myrepository.dump” is the file which contains the dump of the SVN repository of the machine “A”, previously created and transferred to machine “B”



Done! Your SVN repository has been migrated to the machine “B”.




Comments (1):

1
Angela Jones



Thanks for this post, answers a bunch of questions I was having.

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

Reload Image

Insert the code and submit the comment (case-sensitive)