[Mailman-Developers] Reconstructing config.pck

Barry A. Warsaw barry@python.org
Thu, 8 Aug 2002 14:11:22 -0400

>>>>> "LN" == Les Niles <les@2pi.org> writes:

    LN> We had a little disk glitch that trashed config.pck and
    LN> config.pck.save for one of our lists [I don't want to even
    LN> *hear* the word "backup"!]

I'm not sure what config.pck.save is -- did you mean config.pck.last?
Also, do you have a config.pck.tmp.* file laying around?  Mailman
tries really really hard not to leave you with no usable fall backs.
    LN> Roughly the last half of each file is nothing but null bytes.
    LN> These obviously don't unpickle very well....  Does anyone have
    LN> any experience or advice to offer about recovering some of the
    LN> information?  At a minimum I'd like to recover the subscriber
    LN> list, and hopefully the digest/no-digest settings.  I see lots
    LN> of subscribers in the file; presumably there are some objects
    LN> that are intact but the stock pickle.load() just gives up if
    LN> it can't load everything.  Any suggestions would be greatly
    LN> appreciated.

There's no easy way to do it, but it still might be doable.  The
subscribers are kept in a dictionary so you can probably extract that
information if you find the place in the pickle where the dictionary
is defined.

Here's the sad part: by default, pickles are written in binary format
so you're going to have a more fun plucking apart the pickle.  Pickles
are essentially little state machines, and the `language' is defined
in Python's pickle.py module.  UTSL is probably going to be your best

Good luck,