When trying to commit to a subversion repository whose host has just changed from Debian Lenny (5.0) to Squeeze (6.0), i.e. from libdb4.6 to libdb4.8, the following error message could happen:
svn: Commit failed (details follow): svn: Berkeley DB error for filesystem '/var/lib/subversion/foobar/db' while opening environment: svn: DB_VERSION_MISMATCH: Database environment version mismatch svn: bdb: Program version 4.8 doesn't match environment version 4.6
dpkg -i db4.6-util_4.6.21-16_*.deb libdb4.6_4.6.21-16_*.deb
It's surely no bad idea to not do that on the live repository but on a copy until you're sure it worked
# cd /var/lib/subversion/ # rsync -av foobar/ foobar-to-repair/ […] # cd foobar-to-repair/db/ # db4.6_checkpoint -1 # db4.6_recover # db4.6_archive log.0000000009 # svnlook youngest .. 132 # db4.8_archive -d # cd /var/lib/subversion # mv -vi foobar foobar-lenny-db4.6 `foobar' -> `foobar-lenny-db4.6' # mv -vi foobar-to-repair foobar `foobar-to-repair' -> `foobar'
(Based on this µHowto)
In our case no permission changes were necessary after fixing the BDB.
It works identically for the transition from Debian Etch (4.0) to Debian Lenny (5.0), too, just use db4.4 instead of db4.6 and db4.6 instead db4.8. See also the history of this wiki page.
If you get some “munmap: Invalid argument” errors they don't seem to cause any harm.