views:

270

answers:

3

I want to keep a particular folder with all revisions before deleting the current repository from my system for security reasons (means i don't want other informations of the repository, but a particular folder).. So i am thinking of creating a new repository and to get copied the particular folder's content into it.. Can it be possible?

+3  A: 

You should be able to do this with svnadmin dump and svndumpfilter: http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

kdgregory
+5  A: 

Yup. You need svnadmin dump your repository, run it through svndumpfilter to keep the folder you want and then svnadmin load it into the new repository.

Examples are in those links, especially the svndumpfilter one. Hint: to make it all go faster, combine the 3 utilities in a single command, don't dump to a file, filter the file then load the file - pipe the output of each to the next.

gbjbaanb
thanks dude.. actually i seen related question already about copying the content.. But here my question is if i suppose want to delete the old repository, will it create any problem to the copied element or not, that's what.. Anyway i guess it won't affect as u r saying..
One of our sys admin says, if that particular folder got any files moved from another folder or something within the old repository, then he says the filter wont work properly.. Is it true?
remember move in svn is copy+delete, so if you have moved a file into your folder, then it will be there (its copied in). If you move as file out then obviously you won't get that file - you removed it from the folder. The dump will extract all data from the old repo. The old repo has no link to the dump. Its like taking part of a document and pasting it into a new document - delete the old and the new still contains the text.
gbjbaanb
A: 

One of our sys admin says, if that particular folder got any files moved from another folder to it or something within the old repository, then he says the filter wont work properly.. Is it true?

see my comment, but why not try it. dump your repo, filter it to get your folder, load it into a test repo. Do all this on your workstation and see what you get - its a good exercise to do a dryrun before you do it on your live data.
gbjbaanb