Dominik Schäfer wrote at 2004-1-26 21:44 +0100:
I have a serious problem: I think about a week ago my database was damaged by this nasty pack()ing bug. Unfortunately this error was not noticeable until my zope restart yesterday. :-(
Hopefully, you did not pack again in the meantime. In this case, you get at least the state from the pack in "Data.fs.old".
... Is there any possibility to recover the database
Pack has physically removed a lot of transaction and object records. There is no way to reconstruct them from this (corrupted) file.
or to "extract" the transactions of the last 8 days and to prevent the complete loss of data in that time? Has anybody an idea, which I could try?
This is possible but it will not be easy: The idea is that emulate packing in some way. Packing essentially consists of 2 phases. In the first, the packing, phase transactions records are copied into the pack file. During this copying, object records for no longer reachable objects or no longer current are dropped. If a transaction happens to get empty, it is dropped as a whole. This phase ends when the packing time is reached. In the second, the copying, phase, transaction records after the packing time are copied to the pack file. In this process, no object records or transactions are deleted. However, pointers are adjusted. The idea to recover your data would be to emulate packing by processing your "Data.fs.old" in the packing phase and all new transaction records in the copying phase. This will require some tweaking as in your case, both segments reside in different files (while usually, they come from the same file).
P.S. I hope I got the suitable mailing list, I was uncertain if zope.general or zope.zobd fits better...
zodb-dev@zope.org might have been even better... -- Dieter