Subversion: Unable to open an ra local session to URL (DB VERSION MISMATCH)

From FVue
Jump to: navigation, search

Problem

Accessing a Subversion repository gives me this error:

svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///home/freddy/proj/address/repos/trunk'
svn: Berkeley DB error for filesystem /home/freddy/proj/address/repos/db while opening environment:
DB_VERSION_MISMATCH: Database environment version mismatch
svn: bdb: Program version 4.3 doesn't match environment version

Solution

See After upgrading to Berkeley DB 4.3 or later, I'm seeing repository errors.

  • Dump repository with svnadmin linked to Berkeley DB 4.2.
  1. Compile svnadmin linked to Berkeley DB 4.2.
  2. ./old-svnadmin dump repos > svndump.txt
  • Recreated repository with fsfs type: svnadmin create repos --fs-type fsfs
  • Load repository: svnadmin load repos < svndump.txt

Journal

20060427

After upgrading to Berkeley DB 4.3 or later, I'm seeing repository errors.

Within YaST I see Berkeley db-4.3.27 is installed (libdb-4.3.so), as well as db1-1.85 (libdb.so.2). I can also choose to install db42-4.2.52 (libdb-4.2.so). Should I compile myself an svnadmin linked to db42?

Installed db42. After fiddling with ldb versions:

~> svnadmin recover repos
Repository lock acquired.
Please wait; recovering the repository may take some time...
svnadmin: Bad database version: compiled with 4.3.27, running against 4.2.52

20060428

BerkeleyDB

  1. Downloaded db-4.2.52.tar.gz
  2. Built BerkeleyDB.4.2 according to INSTALL

Subversion

  1. Downloaded sources subversion.
  2. ./configure --with-berkeley-db=/usr/local/BerkeleyDB.4.2
  3. make

Now I'm able to recover database:

# /home/freddy/install/subversion-1.2.3/subversion/svnadmin/svnadmin recover repos
Repository lock acquired.
Please wait; recovering the repository may take some time...

Recovery completed.
The latest repos revision is 13.
/home/freddy/install/subversion-1.2.3/subversion/svnadmin/svnadmin list-unused-dblogs repos
cd repos/db
rm __db.00*

Comments

blog comments powered by Disqus