How to Migrate an SVN repository
Published on February 20th, 2009Author: 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”.
- Login to machine “A” using SSH, or if you have a physical access to the machine “A” open the command shell
- 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
- 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”
- Login to machine “A” using SSH, or if you have a physical access to the machine “A” open the command shell
- 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):
2010-03-06 at 7.22 am
Thanks for this post, answers a bunch of questions I was having.
Leave a Reply