![]() | Ned Batchelder : Blog | Code | Text | Site How to move a subversion repository » Home : Blog : December 2006 |
How to move a subversion repositorySaturday 30 December 2006 This is how to move a Subversion repository from one place to another. It's one of those operations I undertake only infrequently, and so have to re-learn each time. This time, I'm writing it down. In this example, I'm converting a file-based repository to a server-hosted one.
Enjoy your new repo.
tagged:
how-to,
source control» 5 reactions | |
Comments
Be sure to manually copy over any configuration files -- like conf/svnserve.conf, if you've modified it, and a password file; also be sure to copy over any active hooks.
Are you sure all of that is needed? Can't you just upload the 'foobar' directory to the server?
me: that's a good tip. I've never used those features, so I didn't need to copy them, but that would certainly be important.
Justin: I don't know if Subversion guarantees the repos are the same from one version to another. I may have a more recent version on my machine that the server does. The dumpfile is the guaranteed way to move contents around. Maybe I'm wrong, but this works.
In the early days of subversion (maybe a few years ago), it was pretty common to get bitten by version skew in the repository formats. The only backend storage option was based on BerkeleyDB, and any version change in that library resulted in a repo you could no longer read. I know this ruined my day more than once after an upgrade.
I think annoyance over the fragility of the BerkeleyDB format drove in part the development of the flat file-based repo format, which is now the default. The flat file repo format is much more stable (though slower), but bad experiences from the bdb-only days have trained us to only trust dump and load.
Continuing that paranoia and always using dump and load is probably a good habit to be in, even if not strictly necessary.
Obligatory plug for distributed version control systems. If you would move your work into something like Bazaar or Darcs, you could work in a central-repository mode as much as you like, with the added benefit that branching and merging, and moving from place to place, would be trivially easy when you wanted to do them.
http://bazaar-vcs.org/
http://abridgegame.org/darcs/
Add a comment: