Subversion: Unable to open an ra local session to URL (DB VERSION MISMATCH)
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
- Dump repository with svnadmin linked to Berkeley DB 4.2.
- Compile svnadmin linked to Berkeley DB 4.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
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
- Downloaded db-4.2.52.tar.gz
- Built BerkeleyDB.4.2 according to INSTALL
- Downloaded sources subversion.
- ./configure --with-berkeley-db=/usr/local/BerkeleyDB.4.2
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*