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

Re: DB Corruption

From: Max Bowsher <maxb_at_ukf.net>
Date: 2005-07-10 15:48:29 CEST

Terry Smith wrote:
> Hi, I am having a problem with corruption. This looks like another
> flavor of a regular problem.
>
> First I saw this:
> -------
>
> C:\Documents and Settings\Terry>svnadmin recover
> c:/Subversion/repository
> Repository lock acquired.
> Please wait; recovering the repository may take some time...
> svn: DB_RUNRECOVERY: Fatal error, run database recovery
> svn: bdb: DB_ENV->log_flush: LSN of 99/206498 past current end-of-log of
> 99/184150
> svn: bdb: Database environment corrupt; the wrong log files may have
> been remove
> d or incompatible database files imported from another environment

Bizarre. It shouldn't even be possible to get into this situation without
something doing some bizarre manipulation of the db files.

Anyway, here's something to try:

FIRST, MAKE A BACKUP.
Do not even consider trying out the below without first making a copy of the
repository.

Now, make sure you have db_dump.exe and db_load.exe available.
Then, cd to c:/Subversion/repository/db and try the following:
(Omit the lines referring to locks and lock-tokens if you are using
Subversion 1.1.x or earlier.)

erase log.* __db.*

rename changes changes.old
rename copies copies.old
rename nodes nodes.old
rename representations representations.old
rename revisions revisions.old
rename strings strings.old
rename transactions transactions.old
rename uuids uuids.old
rename lock-tokens lock-tokens.old
rename locks locks.old

db_dump changes.old | db_load changes
db_dump copies.old | db_load copies
db_dump nodes.old | db_load nodes
db_dump representations.old | db_load representations
db_dump revisions.old | db_load revisions
db_dump strings.old | db_load strings
db_dump transactions.old | db_load transactions
db_dump uuids.old | db_load uuids
db_dump lock-tokens.old | db_load lock-tokens
db_dump locks.old | db_load locks

svnadmin recover ..
svnadmin verify ..

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jul 10 15:50:28 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.