On Fri, Mar 23, 2007 at 04:52:18PM +0100, Sascha Welter wrote:
> (Fri, Mar 23, 2007 at 09:03:55AM +0100) Jens Vagelpohl wrote/schrieb/egrapse:
> > This issue appears when product authors naively use the database
> > modification time instead of defining their own field in which to
> > store modification time data. They would have full control if they
> > used their own time stamps. Most product authors simply don't know
> > what the possible consequences are, or when/how the database
> > modification timestamps are changing.
> Zwiki of course uses its own timestamp attribute: last_edit_time
> The original poster likely got in this mess by not using the Zwiki
> methods to mass-revert the stuff.
Moral of the story is: don't do insane things with your system clock,
the results are undefined.
More generally, don't try giant shotgun workarounds ...
a) if you don't know what the effects will be
b) if you don't really understand your original problem
c) if you don't have a backup in case your "solution" causes a bigger problem
Flem, I'm sorry this happened to you, but sorry to say your attempted
solution was a really bad idea and it's not really fair to blame the
software for that.
The best thing you could do is restore from the backup you made before
you messed with the system clock.
If you didn't make one, you may have to truncate the database to a
transaction previous to when all this happened. Make another backup
copy of Data.fs before doing that, of course.
The basic idea is: find the position in the Data.fs file that contains
the first transaction that occurred at your "in the future" date, and
delete the rest of the file after that point.
This is assuming you haven't already packed the database and thrown
away the old transactions you want to recover.
There isn't really an "official" way to truncate as far as I know, and
I don't remember the details, but the links here might help (look
under the word "truncate"): http://wiki.zope.org/zope2/ZODB
Also check the archives of the zodb-dev mailing list, there has been
some recent discussion of ways to truncate the database file,
the topic was "roll back filestorage zodb to a certain date".
lib/python/ZODB/fsrecover.py may be helpful for finding those transactions.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -