[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Upgrade to 2.3.40 -> failed index

On Mon, 4 Feb 2008, Howard Chu wrote:
Paul B. Henson wrote:
I took another quick look at the BerkeleyDB documentation on the Oracle
site and did not see anything that seemed relevant to copying databases
between machines. Could I trouble you for a URL to see whether there is
anything in those procedures that might have been violated?


At a guess, you failed to copy the transaction log files to the slaves.

Or failed to perform catastrophic recovery instead of normal recovery. (I.e, db_recover must be invoked with the -c option.)

There's another catch: if the DB_LOG_AUTOREMOVE flag is in effect, then taking a hot backup may result in a broken backup if any transaction logs were removed during the backup. If you don't know about this and check for it, you won't even know that the backup is bogus.

So, as a practical matter, if you're using DB_LOG_AUTOREMOVE, then you need to shut down before trying to back up the database at the DB level.

(To quote the DBENV->set_flags() manual:
	If set, Berkeley DB will automatically remove log files that
    are no longer needed. Automatic log file removal is likely to
    make catastrophic recovery impossible.

...and catastrophic recovery is necessary for hot backups.)

Philip Guenther