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

Re: Upgrading BDB repositories on Win32

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-05-06 00:01:17 CEST

Branko ÄŒibej <brane@xbc.nu> writes:

> Philip Martin wrote:
>
>>The upgrade procedure that seems to work on my test repository is:
>>
>>- run 'svnadmin recover' using BDB 4.2
>>- remove db/_db.00?
>>
> Well, there's a bug right there in "svnadmin recover", then. It should
> remove the environment files itself.

svn_repos_recover2() does remove the environment, however
'svnadmin recover' open the recovered repository to read the
youngest revision and so the environment is recreated.

>>- remove or archive db/log.*
>>
>>
> Ouch! This is *not* good.
>
>>Then just start using BDB 4.3, there is no need to run a 4.3 recover
>>although it doesn't do any harm. Note that I have to remove all the
>>log files, even those not designated "unused", I don't know under
>>what circumstances this is safe.
>>
> Never, according to the BDB docs.

4.3 recovery doesn't work with 4.2 log files, even using native BDB
tools. Using BDB 4.2:

$ db4.2_recover -h repo/db/
$ ls repo/db
DB_CONFIG format locks nodes strings
changes fs-type log.0000000001 representations transactions
copies lock-tokens log.0000000002 revisions uuids
$ db4.2_archive -h repo/db/
log.0000000001
$ rm repo/db/log.0000000001

Switch to BDB 4.3:

$ /usr/local/bdb43/bin/db_recover -h repo/db
db_recover: Skipping log file repo/db/log.0000000002: historic log version 8
db_recover: repo/db/log.0000000003: log file open failed: No such file or directory
db_recover: PANIC: No such file or directory
db_recover: DB_ENV->log_put: 3: DB_RUNRECOVERY: Fatal error, run database recovery
db_recover: dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery

$ ls repo/db
DB_CONFIG format locks representations transactions
changes fs-type log.0000000002 revisions uuids
copies lock-tokens nodes strings
$ rm repo/db/log.0000000002
$ /usr/local/bdb43/bin/db_recover -h repo/db
$ ls repo/db
DB_CONFIG format locks representations transactions
changes fs-type log.0000000001 revisions uuids
copies lock-tokens nodes strings

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 6 00:02:05 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.