Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had to wipe our svn server, but I failed to "dump" the repositories before installing a new OS. However, I had a complete backup of every file in each repository. I've since transferred all the old files back over. Unfortunately the version history is completely gone. I still have all the old incremental files, and svn can see each revision with the "verify" command, but I'm wondering if it is possible to import the old history directly from the actual files (not a dump file)?

share|improve this question

Unfortunately I don't think the information exists. You can try running a grep in the .svn directory of one of your working copies (I assume that's how you have a copy of the files) for strings from old log messages. If you find them I'm sure we could work up a script to repopulate the log history, but the file version history is certainly gone. I just poked around at mine and I don't see the log history being saved in the working copy either.

I think the best you will manage is to build a repository with a blank commits up to the version number of whatever copy you have. That way any references to revision numbers will still be valid, they will just be blank.

share|improve this answer

At this point you're best off starting over with a fresh repository - you could try inserting dummy revisions into a tree, but it'll invalidate working copies anyway and lead to weird problems with svn log/diff/etc. It's a lot safer to do that than to try and massage things together in some clever way.

If you have all the historic versions of the files, you could write a script to create new revisions based on the old versions of the files to have the old versions, but you'll lose all the other metadata from each revision, like the date, author, and log message.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.