Subversion: Working With HotCopy

Well, I am almost finished moving all my data onto my brand new MacBook Pro 15″ when I realized I needed to move my Subversion repositories. I’m not an expert on Subversion, nor will I ever claim to be but this might just help a few people out. When I made the backups of my repository I went with the trusty ‘svnadmin hotcopy old_repos new_repos’ option and had a plug and play backup to restore when the time came. Now, I couldn’t find a single reference on how to restore from a hotcopy, and it certainly wasn’t obvious to me so… Here’s what I did:

  1. Download the OS X SVN Installer from Martin Ott’s Site
  2. Install the package.
  3. Make a .profile file in your home directory and paste the following into it: export PATH=$PATH:/usr/local/bin
  4. Issue a ‘svnadmin recover repo_hotcopy’ to start the BDB again.
  5. Ta da, it’s done!

Strangely, that seemed to have fixed everything! Now, that might’ve been the most obvious thing in the entire world to a SVN guru, but it wasn’t to me. I did issue a ‘killall svnserve’ and then a ‘svnserve -d -r repo_hotcopy’ before testing it, but it checked out with SVNx and everything looks good.

2 Responses to “Subversion: Working With HotCopy”


  1. 1 Valle

    It’s a lot more easy:
    After making a hotcopy such as:
    svnadmin hotcopy path/to/repository path/to/backup –clean-logs
    Use this new repository, you just have to make sure svn is installed in the machine your leaving your backup

  2. 2 Ian

    hotcopy is just freezes the repo state at request and makes a copy to avoid copying things that are in an inconsistent state (ie, a commit in progress). If you just stop the svn service and do a file-system copy you’ll get the same result. So long as you drop the repo into the repo directory it should get served up no problem.

    I don’t use the berkley db though so it perhaps its not that simple in all cases.

Leave a Reply