Rob Gonda's Blog

SVN Obliterate

Subversion was been built and designed so you never lose any data no matter what… so there’s no way to permanently delete any data. Everything you delete you can actually bring back from the other world.

It may eventually be a problem… say one you the developers commit to intellectual protected code; there is no way to get rid of it.

There is an open bug track issue to solve this problem, but it seems that there will be no resolution any time soon.

The only way to actually get rid of something is to fully dump the entire repository, delete the existing one, filter the dump, create a new repository, and restore from the dump.

The following steps demonstrate the exactly how to proceed.

Windows Version

svnadmin dump svn_repos > .\dump
type .\dump | svndumpfilter exclude somefolder > .\dump2
STOP SVN Services
Backup svn_repos/conf folder
Delete svn_repos folder
svnadmin create svn_repos
Restore svn_repos/conf folder
svnadmin load svn_repos < dump2

Linux Version
svnadmin dump /path/to/repos > proj.dump
cat proj.dump | svndumpfilter exclude somefolder > cleanproj.dump
STOP SVN services
BACKUP /path/to/repos/conf /path/to/repos/hooks (all custom configuration for this repository)
DELETE /path/to/repos
svnadmin create /path/to/repos
RESTORE /path/to/repos/conf /path/to/repos/hooks
svnadmin load /path/to/repos < cleanproj.dump
RESTART SVN services

*** modified 4/25/06: Added Linux Version from textsnippets

TrackBacks
Subversion Obliterate, the forgotten feature
Sometimes it is best to know forehand some of the more obscure features and limitations of a software product, before diving in. One such obscure limitation is that of the infamous Obliterate feature of the Version Control software, Subversion, that people only learn of when they discover it is not there.
Tracked by Benny's Blog | Tracked on 4/24/09 8:15 AM

Trackback URL for this entry:
http://www.robgonda.com/blog/trackback.cfm?02FB9B31-2B3E-FB41-548CCECA667DAB80

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
This Article is very useful to me, I dig it into http://www.duyp.net/digg/527050-SVN_Obliterate.htm...
# Posted By dave | 11/8/08 8:08 AM
This blog is running version 5.9.003. Contact Blog Owner