[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Disaster Recovery - Restoring a repository with lost revisions...

From: Karan, Cem \(Civ, ARL/CISD\) <CKaran_at_arl.army.mil>
Date: 2005-06-14 14:39:32 CEST

Try this as an experiment (NOTE! I don't know if this will work, I'm just suggesting it as an experiment!)

1) Create a repository with all the files you need
2) make a backup of the repository in the same way that you normally make backups
3) make a bunch of updates
4) blow away your repository, and replace it with the backup
5) See what happens when you try to do the update from your working copy.

IIRC you won't be allowed to make an update. I _think_ you need to do the following:
!!!WARNING!!! I have NOT tried the following! Experiment with data and a repository you don't care about first!

1) Use 'svn export' to export the head of the working copy.
2) Also export the head version of the repository. (only needed if you plan on doing #3)
3) Merge the two together using your favorite merging tool (diff, filemerge, whatever)
4) Import the merged directory back into your repository using 'svn import'

If I understand everything in the book correctly, export should export everything including local changes, unless you tell it not to by giving it a revision number. By merging this with the head of the repository, you get a solid copy of what you want. You also implicitly get rid of all the '.svn' directories in the exported directory. The import will create a new revision.

At this point, you'll need to check out a new working copy. If your export from the WC didn't include your local changes, you'll need to figure out how to merge them into your new working copy.

Try all this and tell us what happens. It will be interesting to know and useful to have in the archives.

Thanks, and good luck,
Cem Karan

-----Original Message-----
From: Tom McMillen [mailto:thomas.mcmillen@mppglobal.com]
Sent: Tue 14-Jun-05 04:38 AM
To: Subversion Users
Cc:
Subject: Disaster Recovery - Restoring a repository with lost revisions...

We’re currently running through some disaster recovery scenarios and I can’t find any reference to this in the SVN book, perhaps someone can tell me what I’ll need to do…..
 
(imagine) Our/your servers have just been destroyed in a big fire/flood/act of god…
 
I now have to restore the svn repository…
 
I have on my laptop the latest wc (revision 1234 with a few local changes) and I have a tape backup that is a couple of days old (revision 1220)
 
I can build a new svn repository and restore this from the backup to rev 1220.
 
How do I now get the repository up to the same point as my wc?
 
I know I can’t get the revisions (1221 – 1234) back, but can I switch to the new repository and do a commit?
 
What about the other developers, once I’ve finished setting up the repository can they just switch to the new one and then do an update?
 
Thanks
 
Tom McMillen
MPP Global Solutions
-----------------------------
t: +44 (0) 870 099 2118
m: +44 (0) 796 070 2994
w: www.mppglobal.com
 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 14 14:43:36 2005

This is an archived mail posted to the Subversion Users mailing list.