How do I convert my repository from using BDB to FSFS or from FSFS to BDB?

There are three steps: 1. A dump/load from the old format to the new one; 2. Copy the hook scripts; 3. Copy the configuration files.

Say you have a repository, /svn/myrepos, which is using the BDB backend and you would like to switch to using the FSFS backend. Follow these steps to make the change:

  1. Close down your server so that the data cannot change during this procedure.
  2. Make a new repository specifying the fsfs backend (it is the default from 1.2 onwards), e.g., svnadmin create /svn/myreposfsfs --fs-type fsfs.
  3. Pipe the output of a dump from /svn/myrepos to the input of a load into /svn/myreposfsfs, e.g., svnadmin dump /svn/myrepos -q | svnadmin load /svn/myreposfsfs. Windows users should dump to a file and load from that file in two separate steps.
  4. Copy any hook scripts that are active in /svn/myrepos/hooks into /svn/myreposfsfs/hooks. Don't mindlessly copy everything, as the templates generated by Subversion may have changed.
  5. Compare the template scripts that the svnadmin create command put in /svn/myreposfsfs/hooks with those in /svn/myrepos/hooks and incorporate any changes that you would like into your active hook scripts.
  6. Copy configuration files from /svn/myrepos/conf into /svn/myreposfsfs/conf (and don't forget a password file, if you use one). Or you might instead want to merge the changes that you made to your configuration files into the new default ones.
  7. Rename /svn/myrepos to /svn/myreposbdb and then /svn/myreposfsfs to /svn/myrepos, ensuring that the file permissions are the same as those that the BDB version had.
  8. Restart the server.

Once you are happy that all is well with your new repository, delete the old one. To do the reverse and migrate from FSFS to BDB, change the svnadmin create command to specify BDB.