Berkeley DB 4.1 has shown itself to be rather unstable - both 4.0 and 4.2 are better. This error message is a symptom of one unique way in which 4.1 will sometimes break.
The problem is that the database format field for one of the tables that make up a Subversion repository using the Berkeley DB backend has become corrupted. For unknown reasons, this is almost always the 'copies' table, which switches from the 'btree' type to the 'recno' type. Simple recovery procedures are outlined below - if they do not succeed, you should contact the Subversion Users mailing list.
* Ensure that no other processes will attempt to access your repository.
* Now, back up your repository to a tar or zip file or similar.
* Change to the db subdirectory of your repository.
* rm __db.* log.*
* db_dump -p -r copies > copies.dump
* Now edit copies.dump. In the section near the top, change "type=recno" to "type=btree", and delete the line beginning "re_len=".
* rm copies
* db_load copies < copies.dump
* svnadmin dump .. > ../../my-recovered.svndump
* Now create a new repository, reload the dump file just produced, and copy across any custom hooks or configuration. Verify that the highest revision number in the new repository is what you think it should be.
Answered by
M P
, an ibibo Master,
at
7:26 PM on October 06, 2008