Upgrading a repository to BDB 4.3 --------------------------------- Debian subversion packages prior to version 1.2.3dfsg1-3 were compiled to use Berkeley DB 4.2; newer releases use BDB 4.3. If you have created any subversion repositories in BDB format (not the default format, but it was the default prior to subversion 1.1.0), you must upgrade them to use BDB 4.3 before subversion will be able to use them. If you try to use a BDB 4.2 repository, you will get an error message including the lines: DB_VERSION_MISMATCH: Database environment version mismatch bdb: Program version 4.3 doesn't match environment version To upgrade the repository, follow the steps below. We shall assume your repository is in /srv/svn/repo1. First make sure the 'db4.2-util' package is installed. Then, ensure that nobody is using or will use the repository while you're updating it. The "mv" commands below will help with this: mv /srv/svn/repo1 /srv/svn/repo1.x lsof +D /srv/svn/repo1.x If the lsof line reports any processes using files in that directory, either wait for them to finish what they are doing, or kill them. Feel free to back up the repository before continuing, although you can't use "svnadmin", since it won't read BDB 4.2 environments. You can use "cp", though, e.g. "cp -a /srv/svn/repo1.x /srv/svn/repo1.bak". Next, make sure the repository databases are in a consistent state (normally they will be, but you are about to destroy the data needed to fix them if they aren't): db4.2_recover -h /srv/svn/repo1.x/db Delete the database "environment": rm /srv/svn/repo1.x/db/__db.??? Now svnadmin can be used, and if there are any unused database logs, you may as well delete them: svnadmin list-unused-dblogs /srv/svn/repo1.x If any such files are found, you can delete them with "rm". Finally, put the repository back where clients can see it again: mv /srv/svn/repo1.x /srv/svn/repo1 Alternatively, you may wish to take this opportunity to change the format of your repository from 'bdb' to 'fsfs'. Of course, this requires enough disk space to store both formats at once: svnadmin create /srv/svn/repo1.new svnadmin dump -q /srv/svn/repo1.x | svnadmin load -q /srv/svn/repo1.new mv /srv/svn/repo1.new /srv/svn/repo1 (and after verifying that everything went well and the new repository is usable...) rm -r /srv/svn/repo1.x Why would you want to switch to 'fsfs' format? 'fsfs' is now the default format because it has several advantages over 'bdb', though also a few disadvantages. The Subversion Book discusses the differences: http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3