You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tom McMillen <th...@mppglobal.com> on 2005/06/14 08:38:06 UTC

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
 

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

Posted by Max Bowsher <ma...@ukf.net>.
Tom McMillen wrote:
> 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?

I think the best way to handle this would be:

* Restore the old repository
* Commit dummy padding revisions into the repository to bring the revnum up 
to 1233
* Check out a new wc
* Make a script to copy every file *ignoring the .svn directories* from your 
laptop wc into the new wc, replacing the versions that are there.
* Run "svn add", "svn rm", as needed.
* Commit the new wc.

Other developers who also had a wc all at 1234 could carry on working, *BUT* 
if anyone has a wc corresponding even in part to one of the lost revisions 
(now dummy padding revisions), then any update operation will likely fail. 
They will need to check out a fresh wc, and port any changes out of the old 
wc, then delete it.


Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org