How to dump only a certain part of SVN repository

svn

How to you move a part of an SVN repository into a new repository?

To move the contents of a complete SVN repository into a new repository, one has to dump the old repository first:

svnadmin dump /path/to/repository > repository-name.dmp

and then load it into the new one using svnadmin load.

But I'm not sure how to just move a part. Do I still have to dump the whole thing? Do I grep for the part that I want?

To just dump myproject, I tried this, but it didn't work:

svnadmin dump /path/to/repository/myproject

Best Answer

You need to use svndumpfilter for stuff like this. In particular svndumpfilter include. So for your case:

svndumpfilter include myproject < repository-name.dmp > myproject.dmp
svnadmin load /path/to/myproject-repo < myproject.dmp

http://svnbook.red-bean.com/nightly/en/svn.ref.svndumpfilter.commands.c.include.html

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

Related Question