You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hans L <th...@gmail.com> on 2009/01/29 01:45:04 UTC

Can my corrupted repository be salvaged?

The hard drive holding my SVN repository recently failed.  We were
able to recover the files from the failing hard drive, but it appears
much of the files were corrupted.
I created a new server to put subversion, and copied the recovered
repository files over.

When I try to check out all the HEAD revision in the repository, I
eventually reach this error
svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http://svnserver)

I found that running "svadmin verify" gives me the following output
* Verified revision 0.
* Verified revision 1.
* Verified revision 2.
* Verified revision 3.
...
* Verified revision 106.
* Verified revision 107.
* Verified revision 108.
svnadmin: Revision file lacks trailing newline

All revisions through 108 say Verified.  So I interpret this to mean
that revision 109 is corrupt somehow.

As I understand it is possible to dump the non-corrupt revisions and
then load them into another repository.  So I tried a dump:

svnadmin dump /var/svn -r 1:108 > dump-1-108
* Dumped revision 1.
* Dumped revision 2.
* Dumped revision 3.
* Dumped revision 4.
* Dumped revision 5.
* Dumped revision 6.
* Dumped revision 7.
* Dumped revision 8.
svnadmin: No such revision 9

I don't understand why it now tells me that revision 9 does not exist.
 As I just I run the verify command, it verifies this revision 9 just
fine.

Also, I'm a bit confused if what I'm trying to do is even possible.
As I understand it, each revision is stored as a diff of the previous
revision, so must every revision be intact for me to check out HEAD?
If, for example, I was able to dump revisions 1:108 and then 110:HEAD
(skipping a corrupt revision 109), and load those dumps in a
repository, does that mean that any changes made in revision 9 will
not be applied to any later revisions?

Basically, is there any hope in using this repository data 1)
Retreiving at the very least the HEAD revision? and 2) Retaining any
revision history?   Or am I going to have to start fresh and import
everything from scratch from whatever checked out files I can find on
various other computers?

Also, not sure if this matters, but the initial server was on windows,
and the rebuilt one is on Linux.  Unfortunately there were no backups
of the repository.

Any help is appreciated

Thanks,
Hans

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Can my corrupted repository be salvaged?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Wed, Jan 28, 2009 at 8:45 PM, Hans L <th...@gmail.com> wrote:
> The hard drive holding my SVN repository recently failed.  We were
> able to recover the files from the failing hard drive, but it appears
> much of the files were corrupted.
> I created a new server to put subversion, and copied the recovered
> repository files over.
>
> When I try to check out all the HEAD revision in the repository, I
> eventually reach this error
> svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http://svnserver)
>
> I found that running "svadmin verify" gives me the following output
> * Verified revision 0.
> * Verified revision 1.
> * Verified revision 2.
> * Verified revision 3.
> ...
> * Verified revision 106.
> * Verified revision 107.
> * Verified revision 108.
> svnadmin: Revision file lacks trailing newline

I'm at work, so I can't respond at length to this... but it sounds
like r109 is pretty corrupted.  If you can send me the revision file,
I can take a look it.  Any associated information (perhaps the revprop
file for r109 as well) would be useful too.

> All revisions through 108 say Verified.  So I interpret this to mean
> that revision 109 is corrupt somehow.
>
> As I understand it is possible to dump the non-corrupt revisions and
> then load them into another repository.  So I tried a dump:
>
> svnadmin dump /var/svn -r 1:108 > dump-1-108
> * Dumped revision 1.
> * Dumped revision 2.
> * Dumped revision 3.
> * Dumped revision 4.
> * Dumped revision 5.
> * Dumped revision 6.
> * Dumped revision 7.
> * Dumped revision 8.
> svnadmin: No such revision 9

Weird.  Dump and verify should really be doing the same thing.  I know
one of the devs changed some behavior recently (1.5 maybe?).  What
version are you running?  Can I have r9 as well?  This sounds pretty
bad though (like r9 is missing from the disk).

> I don't understand why it now tells me that revision 9 does not exist.
>  As I just I run the verify command, it verifies this revision 9 just
> fine.
>
> Also, I'm a bit confused if what I'm trying to do is even possible.
> As I understand it, each revision is stored as a diff of the previous
> revision, so must every revision be intact for me to check out HEAD?
> If, for example, I was able to dump revisions 1:108 and then 110:HEAD
> (skipping a corrupt revision 109), and load those dumps in a
> repository, does that mean that any changes made in revision 9 will
> not be applied to any later revisions?

Not quite.  Differences are stored, but they're computed using skip
deltas.  There are notes in the SVN repo if you're more interested in
what is happening underneath the hood.  It gets more complicated than
that.  Again, I'm at work, so I can't really dive into it right now.

> Basically, is there any hope in using this repository data 1)
> Retreiving at the very least the HEAD revision? and 2) Retaining any
> revision history?   Or am I going to have to start fresh and import
> everything from scratch from whatever checked out files I can find on
> various other computers?
>
> Also, not sure if this matters, but the initial server was on windows,
> and the rebuilt one is on Linux.  Unfortunately there were no backups
> of the repository.
>
> Any help is appreciated

I can get the repo up and running again.  What is lost depends on what
happened in r109... and possibly r9.

Send me the two files, and I'll take a look (hopefully early tomorrow morning).

-John

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].