On Fri, 15 Dec 2006, Andrew Daviel wrote:
I think Mark said there would at some point be a Mix repair tool.
Yup, and I've been waiting to hear what corrupted mix mailboxes look like
so I have an idea of how the tool should work.
We had a power bump last night and I have a user with .mixstatus and
.mixindex full of nulls. I may have a go at recovering it, or may have a
recent backup, but wondered if this had already been done (writing a
tool, that is).
This is the sort of thing that I've been waiting for...
Here's how I recommend that you proceed, assuming that you feel that
you're up to doing the necessary diagnostic work. I very much would like
to hear the results!!!!!!
Get a restored copy of the mailbox from backup. That's the base level,
worst-case, of what you recover for the user.
Delete any .mixsortcache file from the damaged file. We don't need it.
Now, make a copy of the damaged mailbox. We need the data files for
later (see the extra credit problem)
Inspect the .mixmeta file in the damaged mailbox. Is it still sane?
Compare it with the one in the restored copy.
Make the .mixstatus file in the damaged mailbox be sane. That is, get rid
of the nulls, and make sure that it has a proper sequence record at the
start and all the other records are complete. The format is pretty
obvious (and described in mixfmt.txt); all but the first line should be
the same length. Remember that these lines have CRLF newlines!
Make the .mixindex file in the damaged mailbox be sane, as above.
Try to open the damaged mailbox. Does it look good? Are all messages
accessible? Can you expunge it? Can you browse all messages (e.g., in
Pine or Alpine, go through the complete message index to make sure that
every message is readable). If so, we have a fixed mailbox.
Which one looks better: the restored mailbox or the fixed mailbox? Does
one mailbox have messages that aren't in the other? Perhaps you might
want to merge the two by copying messages from one to the other.
Extra credit. Now we get into the fun stuff. Maybe you don't want to do
any of this.
Remember that copy of the damaged mailbox that you made? Write a little
program which reads all the data files and collects the internal
per-message header lines. You now have enough data to make your own index
of the data files.
This is technically the easiest since it's purely automated, but the
problem is the judgement call in what you do with this data once you have
it. Plus there's all the judgement calls above.
Perhaps there are some more messages there that you might want to use in
building an index; this will also "unexpunge" any messages which were
expunged but not burped due to sharing. If so, there's some more messages
that can be put into the fixed mailbox.
Anyway, I'd be interested to hear what you observed and what you decided
to do. The future automated tool needs to do some analysis, reporting,
and maybe make some judgement calls of its own; but to help decide what
goes into that tool some manual analysis (along with "what I did and why")
of these first few incidents would be very helpful.
Thanks!
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw