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.
- Back up your repository to a tar or zip file or similar.
- Change to the db subdirectory of your repository.
- Run rm db.* log.*
- Run db_dump -p -r copies > copies.dump
- Edit copies.dump. In the section near the top, change "type=recno" to "type=btree",
and delete the line beginning "re_len=".
- Run rm copies
- Run db_load copies < copies.dump
- Run 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.