[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: Max Bowsher <maxb_at_ukf.net>
Date: 2005-06-14 15:29:37 CEST

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
Received on Tue Jun 14 15:32:33 2005

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.