SVN - Restore repository from backup
Asked Answered
J

1

6

We have just had a file server fail which contained our SVN repository.

We're trying to recover the file system but at the moment, that looks like it isn't going to happen so we're looking at backups.

The best full backup that I have available is one week old.

My plan is to restore this backup to a new SVN server. Then run through every developers machine and check latest revision numbers, then manually export the latest version of each project and commit it all to the new server.

My question is, does anyone have an experience of this? My plan is very much a manual one and therefore prone to errors!

The server we use is Visual SVN and the client we use is Tortoise SVN.

Any suggestions would be appreciated.

Jarrad answered 11/10, 2010 at 8:56 Comment(2)
I sure hope you will now backup more frequently than once a week.Splat
That is the nice thing about a DVCS: Everyone has everything, so there is no single point of failure. With Subversion, you can set up a mirror repository that gets a copy of every single commit as soon as it comes it.Taphole
G
4

Surely there is no automatic method.

I would do it this way: After restore, I go to each developer, re-checkout projects, write over with their local files, commit. Pay attention to .svn folders - you should not copy them over (You can set Total COmander to ignore them).

Galloping answered 11/10, 2010 at 9:4 Comment(4)
+1 Yes, that's what we had to do, too. If all the code is still on the developers' machines somewhere, you will not lose anything (except the intermediate commits for one week). Be sure to not delete anything from the developer machines until you are done, and do not touch those working copies, especially do not try to merge or update. Check out new working copies of the one week old codebase, and copy any newer stuff into them.Taphole
You can svn export a local working copy, too. This way you don't have to fiddle with those .svn directories.Unbelief
It seems to me, though, that files that have been svn added but not svn committed won't be in the export.Supra
Scratch that. The svn added files will be in the export, but when you copy the export over the new checkout, you will need to svn add the files again because as far as the new checkout is concerned, they are unversioned.Supra

© 2022 - 2024 — McMap. All rights reserved.