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

Re: Recovering SVN repository

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Fri, 1 Aug 2008 08:24:23 -0500

On Aug 1, 2008, at 05:10, Michael Guyver wrote:

> Ryan Schmidt wrote:
>
>> On Aug 1, 2008, at 03:15, Michael Guyver wrote:
>>
>>> I've tried to run
>>>
>>> svnadmin dump svnroot/db
>>>
>>> but receive the following message:
>>>
>>> svnadmin: Expected repository format '3' or '5'; found format '1'
>>
>> Don't use "svnadmin dump svnroot/db". Use "svnadmin dump svnroot".
>
> Thanks Ryan. When I try that with svnadmin 1.4.4 I get the message:
>
> svnadmin: Berkeley DB error for filesystem 'svnroot/db' while getting
> youngest revision (finding last entry):
> DB_RUNRECOVERY: Fatal error, run database recovery
> svnadmin: bdb: page 0: illegal page type or format
> svnadmin: bdb: PANIC: Invalid argument
> svnadmin: bdb: PANIC: fatal region error detected; run recovery
>
> I've installed BDB 4.6 and have tried
>
> db_recover -f -h svnroot/db
>
> which completes to 100% but the result remains the same and the error
> message is displayed.
>
> Given that the repository was running fine before the server problems,
> and wasn't being accessed at the time the server went down (I'm the
> only one with access), surely it should be recoverable? I should
> probably add that I simply tarballed svnroot/* and scp'd it across the
> wire to my desktop. Could that have introduced a problem?

The portable way to move repositories from one computer to another is
to run "svnadmin dump" on the one computer and "svnadmin load" on the
other. Copying a repository directory can work if both machines have
the same versions of BDB and the same processor architecture. If the
new machine has a newer version of BDB, it should be possible to
upgrade the repository to the new format. But it looks like if the
older version is < 4.3 and the newer version is >= 4.3 then you will
have the problem described here:

http://subversion.tigris.org/faq.html#bdb43-upgrade

You can see what version of BDB the repository was using; see the FAQ:

http://subversion.tigris.org/faq.html#divining-bdb-version

I don't use BDB repositories so I don't have personal experience with
any of this.

> If I run the db_verify command from the BDB distribution, the DB files
> all check-out OK except the revisions file, which gives this error:
>
> db_verify: Page 5: btree or recno page is of inappropriate type 0
> db_verify: Page 5: totally zeroed page
> db_verify: Page 5: record count incorrect: actual 0, in record 225
> db_verify: Page 6: btree or recno page is of inappropriate type 0
> db_verify: Page 6: totally zeroed page
> db_verify: Page 6: record count incorrect: actual 0, in record 225
> db_verify: Page 7: btree or recno page is of inappropriate type 0
> db_verify: Page 7: totally zeroed page
> db_verify: Page 7: record count incorrect: actual 0, in record 132
> db_verify: Page 1: bad record count: has 602 records, claims 1184
> db_verify: Page 4: unterminated leaf chain
> db_verify: /home/guyverm/svnroot/db/revisions: DB_VERIFY_BAD:
> Database verification failed
>
> I wonder whether this is caused by a mismatch between DBD
> versions, but if not, whether the revisions file is recoverable.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-01 15:24:59 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.