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

Re: Restore corrupted revision from backup

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Tue, 16 Jun 2009 19:32:25 -0500

On Jun 16, 2009, at 07:52, Marco Eckstein wrote:

> assume the following situation:
>
> -Subversion server version is 1.3.x
> -FSFS backend
> -Windows XP
> -Exactly one revision is corrupted. This can be found out by using
> svnadmin verify -r 0:NumberOfCorruptedRevision and svnadmin verify -r
> NumberOfCorruptedRevision+1:HEAD, executed on a copy of the repository
> and Subversion 1.5.
> -A backup of an uncorrupted repository including revision
> NumberOfCorruptedRevision exists.
>
> Consider the following attempt to repair the repository:
>
> -Temporarily disable all Subversion client access to the repository
> -Overwrite the file myRepository\db\revs\NumberOfCorruptedRevision
> with
> myRepositoryBackup\db\revs\NumberOfCorruptedRevision
>
> Is this the correct way to restore a corrupted revision?

If it is the contents of the revision that was corrupted, then yes,
that should be it. If it was the properties of the revision that were
corrupted, then you would deal with the file in db\revprops instead
of db\revs.

> Unfortunately, I found no definite answer to that question, just a
> vague
> statement in the book "Version Control with Subversion" (for
> Subversion
> 1.5) on page 314 about svnadmin verify which states: "If this command
> fails (...) that means your repository has at least one corrupted
> revision, and you should restore the corrupted revision from a
> backup (...)"
>
> The approach definitely SEEMS to work, which can be seen when
> testing it
> and running a successful svnadmin verify. However, I want to be sure
> that there are no ill effects. After all I do not know how svnadmin
> verify works in detail and how much it can be trusted.

If it's working now, then I'd agree you've fixed the problem.

As far as I know, for FSFS repositories, svnadmin verify verifies
that the files in db\revs look reasonable. One of them didn't before,
and now that you've replaced it with its backup, it's fine.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2362662

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-17 02:34:01 CEST

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.