How to fix "DB_VERSION_MISMATCH: Database environment version mismatch"?

This happend to when I switched from Lenny to Squeeze and before, when I switched from Etch to Lenny. You might want to convert your repository to fsfs, so next time you don´t have bdb problems anymore, if so, follow this small tutorial. First you have to fix the repository of course, so here you go:

First make sure you have the correct dbutils installed for yoru bdb version:
(in my case the error message was like this: Program version 4.6 doesn't match environment version 4.4)

 

  • aptitude install db4.4-util db4.6-util 

Once that is done, let´s convert the repository, before doing that, stop everything that accesses the repository, might interefere and also you should create a backup before running these commands!

 

  • cd /PATHTOREPO
  • db4.4_checkpoint -1
  • db4.4_recover
  • db4.4_archive
  • svnlook youngest ..
  • db4.6_archive -d
These commands might take some time to complete, but should work fine.


PS: on the move to squeez the message lookced like this:

svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///PATHTOREPO'
svn: Berkeley DB error for filesystem '/PATHTOREPO/db' while opening environment:
svn: DB_VERSION_MISMATCH: Database environment version mismatch
svn: bdb: Program version 4.6 doesn't match environment version 4.4

 

You cannot comment on this entry