3

I have a SVN repository which was running locally when I had an old installation of Windows. After reinstalling Windows, obviously the old SVN server installation was removed, and now I have no idea how to still use this old repository? I haven't tried the svn create on the old server, as I am afraid that I'll lose everything in the repo?

I need to either still be able to use this using any SVN server software, or convert it to git. Either is fine!

Any help would be appreciated.

2 Answers2

8
  1. Make a copy of the SVN repo somewhere
  2. to be safe, create a dump from that

    svnadmin dump "C:\PATH\TO\REPO" > "C:\svnrepo.dump"

  3. Create a new repo like you used to (e.g. svnadmin create "C:\SomeRepo")

  4. Load the dump to the new repo

    svnadmin load "C:\SomRepo" < "C:\svnrepo.dump"

I don't have windows at hand so I could not verify the '<' '>' usage but that's basically it. Do note that you might have to give full path to svnadmin.exe in your system unless it's in your %PATH.

Windows subversion example

Windows subversion download link

Manwe
  • 528
5

Manwe has given you a great answer to your question body (getting you back to a point where you should be able to access your SVN repository again).

I would go a step further and say that after you do that you should definitely give serious consideration to switching to git. You will have a working SVN repository, so you can use the tools that come with git to suck in the SVN repository and create a new git repo, and you have the git-svnserver that comes with git that lets you emulate SVN if you have developers who can't make the move yet.


Among the advantages of moving to git:

  • Every developer has a full copy of the repository. They can commit locally and delay pushes if the server is down.
    (So if you reinstall Windows and lose the server for a few days like what happened this time development can continue)

  • Every developer has a full copy of the repository. These are effectively a distributed backup.
    (Don't rely on it as such, but in a crisis any checkout can be declared to be the "origin" repo).

  • git is just better than SVN
    (OK, that last one is my opinion, but pretty much every developer I've worked with agrees -- Linus got version control right with git. It really is a pleasure to use once you get accustomed to the commands.)

Further reading on migrating from SVN to git: git ready: Converting from SVN.
Google will also throw out a plethora of results for Converting from SVN to git or similar queries.
I also consider "A successful git branching model" to be required reading for people moving from CVS (and to a lesser extent SVN) -- Branches in git are a good (and painless) thing.

voretaq7
  • 80,749