RE: repository recovery?
From: Karan, Cem \(Civ, ARL/CISD\) <CKaran_at_arl.army.mil>
Date: 2005-01-12 01:54:43 CET
>>> At this point (this may not have been wise, I realize) I decided to
I'm going to poke my nose in as well at this point. Out of curiosity, what version of subversion are you using? There was one version (1.0.9 using BDB 4.1 IIRC, Max, you'll know this, I'm just a user, not a developer) that tended to corrupt the repositories regularly. If you are using that version, then once your repository is unwedged, upgrade to the latest version of subversion. I know someone knowledgeable told me that they have fixed the BDB problems at this point completely, but I've been using FSFS on my repositories and (so far) haven't had any problems. That said, I tend to make backups religiously.
As for getting something up and running again, I think you could follow the following recipe. Note that since your wedged repository is gone, you will have lost all of the revisions in between, but, such is life...
1) Make backups of everything (working copy, repositories, EVERYTHING), prefereably somewhere where they can't be overwritten. The rest of this depends on deleting/overwriting stuff, which could dangerous.
2) Replace your hosed repository with your backup.
3) Move your working copy somewhere where you can hack around on it. I'm going to call this the old working copy.
4) Checkout a new working copy in the location where you want it to be. I'm going to call this the new working copy.
5) Either use the finder to search for all of the ".svn" folders in your old working copy and trash them, or run the following command from the terminal within the top level directory of the old working copy (NOT root, JUST the working copy!)
find . -type d -path "*.svn*" -exec rm -rf {} \;
4) Either use FileMerge to merge the files in the old working copy into the new one (lets you get rid of those "brilliant" ideas you never should have had) or simply replace them using your favorite method. Note that you can't just copy the whole folder over; you need to save the ".svn" folders in the new working copy for this trick to work.
5) Run 'svn status' at the base of the new working copy. Add any files you need to add to the repository, then do an 'svn commit' and and 'svn update'. If there are any files that are missing, then you'll need to do 'svn update', 'svn commit', and then 'svn update'.
At this point, if you're not already using the latest stable version of subversion, you may wish to upgrade, and switch to using the FSFS repository option. I know if there have been changes to how the compile script worked between 1.1.1 and 1.1.2, but I remember that I had a couple of slight hiccups compiling 1.1.1 originally. If you need help in doing the upgrade, email me. As a further note, follow the SVN book in how to do an upgrade; you can make life difficult for yourself if you don't.
Note that the above method won't save things that are not stored int the repository. IIRC there are some unversioned things (Max?), but as long as you don't have them you'll be OK.
Good Luck,
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.