Take a copy of the subversion repository
In order to migrate a subversion repository you must NOT do a plain copy of the database. You must do a DUMP of the repository.
svnadmin dump path/to/repository > repository.dump
Restore your repository
At your new repository location, first create the repository.
svnadmin create repository
Then load your dump into the new repository you have just created. Copy the dump file to your new server if you need to.
svnadmin load path/to/repository < repository.dump
This operation will take a while depending on the size of your repository.
Dump and Load a portion of the repository
You can dump and load a specific range of revisions of your repository using the following command.
svnadmin dump REPOS_PATH [-r LOWER[:UPPER]] [--incremental] [--deltas]
Here I have used 1547 as the lower range of my repository revision and 9206 is the upper range (note that the dump will contain all revisions within and INCLUDING these bounds)
svnadmin dump -r 1547:9206 --incremental --deltas repository > repository.dump
I used this to pickup and catchup on the revisions that I have missed since I have initiated the dump and load.
For more information about the “svnadmin dump” command please visit here
Update and change the URL location of you working copy to new a path
If you have changed the location of your repository. You will need to point your working copy to the new SVN URL. To do this you will need to run the following command:
svn switch --relocate FROM_PATH TO_PATH
