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
There are no trackbacks for this entry.

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

Comments
car wash car wash car wash car wash car washcar wash
# Posted By car wash | 10/13/08 2:37 AM
This blog is running version 5.9.003. Contact Blog Owner