seanism DOT com Random thoughts from the world of seanism

8Feb/110

Migrate a Repository Subfolder to Another Repository

If you have a subfolder that you'd like to migrate from one repository to another SVN has some built in tools that allow you to do that.

  1. Open a command prompt and point it to the directory SVN is installed.  For Windows that is C:\Program Files\VisualSVN Server\bin.  The default Repository directory is C:\Repositories.
  2. Type: svnadmin dump "path to Repository" > repoDumpFile.dmp
  3. You'll then to filter out everything but the sub directory you want to migrate.
    Type: svndumpfilter include "Path to Subfolder" < repoDumpFile.dmp > Filtered-repoDumpFile.dmp
  4. The above command will include all revisions even those not relevant to the subfolder you are migrating.  If you'd like to remove the non relevant revisions and/or re number them you can use the below command instead of the above.
    Type: svndumpfilter include "Path to Subfolder" --drop-empty-revs --renumber-revs < repoDumpFile.dmp > Filtered-repoDumpFile.dmp
  5. Let's create the new Repository.
    Type: svnadmin create "Path to Repositories\New Repository Name"
  6. Now we import the file.
    Type: svnadmin load --ignore-uuid "Path to Repositories\New Repository Name" < Filtered-repoDumpFile.dmp

References: http://svnbook.red-bean.com

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.