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

Re: Recovering from a recent backup

From: Dean Iverson <diverson_at_drivesafety.com>
Date: 2005-04-27 23:41:39 CEST

Max,

Thanks for letting me know I was going down a dead end. Let me back up
a step and maybe someone can point me in the right direction.

We discovered we had a corrupted repository when running any svn client
command gave an error message suggesting we needed to do a recover on
the repository. Trying to do a simple "svnadmin recover" command on
the server resulted in a segfault crash. Trying to do a db_recover
from the repository's db directory resulted in panic messages
complaining about the format of the last log file. If I remove the
last log file in the db directory I can run svnadmin recover without
crashing but it gives the following error (and subsequent dump or
verify attempts fail with errors):

Repository lock acquired.
Please wait; recovering the repository may take some time...

Recovery completed.
The latest repos revision is 319.
svn: Berkeley DB error while closing 'strings' database for filesystem
curriculum/db:
Invalid argument
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log

If I start from a fresh copy of the repository and delete the corrupted
log file, I can get "db_recover -vec" to run:

db_recover: Finding last valid log LSN: file: 227 offset 416244
db_recover: Recovery starting from [1][28]
db_recover: Recovery complete at Wed Apr 27 15:24:41 2005
db_recover: Maximum transaction ID 800264f1 Recovery checkpoint
[227][416292]
db_recover: Recovery complete at Wed Apr 27 15:24:41 2005
db_recover: Maximum transaction id 80000000 Recovery checkpoint
[227][416292]

And it looks good until I try to do a dump (or verify) in which case it
says:

* Dumped revision 0.
svn: Berkeley DB error while moving cursor for filesystem curriculum/db:
DB_PAGE_NOTFOUND: Requested page not found
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: Berkeley DB error while closing 'strings' database for filesystem
curriculum/db:
Invalid argument
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log
svn: bdb: DB_ENV->log_flush: LSN past current end-of-log

So this is where I currently am. I am not sure if there is anything
else I can try. Does anyone have any suggestions?

Regards,

Dean Iverson
DriveSafety, Inc.

On Apr 27, 2005, at 2:31 PM, Max Bowsher wrote:

> Dean Iverson wrote:
>> We switched to subversion from CVS a few months ago. We have now
>> experienced a server crash and I am attempting my first recovery of a
>> subversion database.
>>
>> From searching the internet and the archives of this newsgroup, I have
>> understood that if I have a recent snapshot of the repository and
>> recent log files, I should be able to copy the log files into the
>> older
>> repository and do a "db_recover -vec" to have the database reapply the
>> changes from the log files.
>>
>> I had a dump of the database from a couple of months ago. In addition
>> I was able to salvage most of the recent log files from the
>> repository.
>> So I created a new repository and loaded the dump file into it. This
>> got me up to log.0000000099. I then copied log files log.*99 through
>> log.*227 into this new repository and ran "db_recover -vec" from the
>> repository's db directory.
>
> You can't do this. To use Berkeley DB log files in this way, you need
> an actual backup of the Berkeley DB database itself. One reconsituted
> from a dump file is a completely different database as far as Berkeley
> DB is concerned, and the log files cannot be applied.
>
> Max.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 27 23:53:45 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.