[Zope-dev] Re: [ZODB-Dev] Big problem.
Jeremy Hylton
jeremy@zope.com
Thu, 10 Jan 2002 16:39:47 -0500
I don't know if a tool exists either. I think something quick could
be hacked together, but I doubt I'd have time to do it anytime soon.
I don't know if you up for some programming to accomplish this goal or
not.
There are a couple of ideas I have along these lines in case you or
someone else can pursue them.
There's a tool called fstest.py in two places in CVS:
Zope/utilities/ZODBTools and StandaloneZODB/Tools
If you run it with a -vv argument it will show you all the individual
transactions an objects. It prints a transaction id, and could be
modified to convert those transaction ids to timestamps. From the
timestamps and oids, you could probably figure out the last good
transaction.
You can use transactionalUndo() on every transaction id following the
last good one.
You might be able to go into the storage and truncate it at the last
good transaction. You'd need to blow away the index, too. This
sounds risky, but might be the simplest solution. (Backup the file
first :-).
Jeremy