In our group we have a repository, we would like to move the repository, but in he meantime also we would like to delete some folders and re-indexing the revision(delete all the revision numbers which are related to the deleted folder) Is this possible? If yes How?


You should take the repository offline by stopping either svnserve or Apache.

Then dump the repository content to file using a command like

svnadmin dump repos-folder/ > repos-dumpfile

After that you can split the dump by filtering out the relevant changes by using the svndumpfilter tool. In the example below "my-branch" is the path within the repository that you want to put into a separate repository:

svndumpfilter include my-branch --drop-empty-revs --renumber-revs < repos-dumpfile > branch-dumpfile
svndumpfilter exclude my-branch --drop-empty-revs --renumber-revs < repos-dumpfile > nobranch-dumpfile

Then you can create the empty repositories for the filtered dump files and import the dump data:

svnadmin create repos-branch-folder
svnadmin load --ignore-uuid repos-branch-folder < branch-dumpfile
svnadmin create repos-nobranch-folder
svnadmin load --ignore-uuid repos-nobranch-folder < nobranch-dumpfile

You can find further information in the Repository Maintenance section of the excellent Subversion Book.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.