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

Re: Unrecoverable svn db

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-11-13 11:44:17 CET

Timothy Wayper wrote:
>>> After upgrading from OSX 10.3.5 to 10.3.6, my svn 1.0.6 repository is
>>> now inaccessible:
>>>
>>> rita:~ timmy$ svnadmin recover /repos
>>> Please wait; recovering the repository may take some time...
>>> svn: DB_RUNRECOVERY: Fatal error, run database recovery
>>
>> Did your version of Berkeley DB change in the upgrade? If not, have
>> you tried db_recover -vech /repos/db?
>
> Thanks for the tip. Unfortunately, the DB recovery also fails:
>
> db_recover: Finding last valid log LSN: file: 187 offset 88428
> db_recover: Ignoring log file: /repos/db/log.0000000174: magic number
> 0, not 40988
> db_recover: Invalid log file: log.0000000174: Invalid argument
> db_recover: First log record not found
> db_recover: PANIC: Invalid argument
> db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database
> recovery

The mentioned log file seems corrupt.

First, make sure no other processes (apache, svnserve, etc.) will try to
access the repository.
Then, make a backup (tarball) of your repository.

rm /repos/db/__db.*
rm /repos/db/log.0000000174
db_recover -vch /repos/db

If it worked, svnadmin dump and svnadmin load into a new repository.

If not:

rm /repos/db/__db.*
rm /repos/db/log.*
db_recover -vch /repos/db

If it worked, svnadmin dump and svnadmin load into a new repository.

If not:
Put the repos backup tarball on a web/ftp site and email me the URL.

Max.

PS: I intentionally left out the db_recover -e flag. I don't see why people
like recommending it. AFAICS, all it does is cause files which can
potentially confuse BDB to hang around on disc, when new ones would be
created at first access anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Nov 13 11:44:59 2004

This is an archived mail posted to the Subversion Users mailing list.