How do I dump one project out of an SVN repository which contains multiple projects?
51,057
You can use the svndumpfilter utility to do this. The SVN book has a good explanation of how to do this.
For instance, one way would be:
$ svnadmin dump /path/to/repo
| svndumpfilter include /proj > dump-file
$ svnadmin create /new/proj/repo
$ svnadmin load --ignore-uuid /new/proj/repo < dump-file
$ svn rm file:///path/to/repo/proj
Related videos on Youtube
Author by
Stacey Richards
Updated on December 26, 2020Comments
-
Stacey Richards over 3 years
I am working with an SVN repository with many projects. I need to move a few of the projects out of that repository into individual repositories, one for each project, keeping the history.
I've been able to use
svnadmin dump
to dump the entire repository andsvnadmin load
it into another repository, but I can't find a way of dumping only one project from the original repository so I can load it into the new one. Is this possible? If so how?-
Jens Piegsa over 10 yearsI like to share one pitfall that i ran into: filtering for a subfolder, also filters out the creation of the parent folder. So one has to create the parent folder in the target repository manually.
-
-
Stacey Richards over 15 yearsThanks Avi, I've just read the docs and it look like that's what I needed.
-
wimh over 15 yearsyou forgot to input the dumpfile to the svnadmin load command.
-
Avi over 15 yearsThanks, Wimmel. I didn't actually forget; I forgot to escape the less-than sign. Fixed now.
-
Kit Roed over 15 yearsit might be worth noting that the args --drop-empty-revs and --renumber-revs can be used with svndumpfilter to clean up gaps in the revision numbers
-
ziggy almost 10 yearsCan any user perform these actions or do they require admin privileges?
-
gbjbaanb over 9 years@ziggy any user can do this if they have access to the svnadmin command and the raw repo files (ie access to the server its running on).
-
Buddybear over 9 yearsWhat if I want to dump multiple projects..?
-
Prikkeldraad about 8 yearsThis solution renumbers the revisions. When you don't want to renumber the revisions just don't use --drop-empty-revs and --renumber-revs.