[Zope] Recovering corrupt XML Export files?
Terry Hancock
hancock@anansispaceworks.com
Sat, 24 Aug 2002 04:44:25 -0700
Hi,
I recently had some problems with my site involving
CookieUserFolder, so I was trying to back it out. However,
even after removing all CUF folders and the product,
I still had cookie authentication coming up (apparently
following the information in regular UserFolders (?)).
Anyway, thinking that something invisible was going
on in the site, I tried exporting and importing a large
part of the site.
The export seemed to work, but the import failed, initially
with a complaint about an __init__() not receiving enough
parameters. This was apparently from a DTMLFile class
instance. Unfortunately, I hadn't backed up the Data.fs
right before doing this (I was unfortunately relying on
the export to work -- I know ... I should've known better).
Anyway, I was hoping to try to recover this XML export
file. I made a copy and tried to chop out references
to the CookieUserFolder and DTMLFile objects. I figured
I'd probably lose some data, but might be able to get
the bulk of it to load.
I did this by cutting "item" and "record" elements
containing the strings "CookieUserFolder" or "DTMLFile".
I did get past the __init__ error, but now am seeing
a new one:
cPickle.BadPickleGet
I should also mention that this XML file is just over
64 megabytes in size -- I suppose I could be running
out of memory or something. I don't know enough about
how it's parsed to know if that's likely (but surely
Zope export files are expected to be large?).
I'm also inquiring with my hosting provider, who I
think keeps fairly frequent backups -- I may be
able to restore a not-too-old copy of my Data.fs
file, but I'm hoping to get some recent data out,
if at all possible.
I don't really understand the structure in the XML
export file. It looks really fine-grained, and I'm
not sure I can easily extract data based on the
original folder structure -- is there any chance of
doing that (i.e. finding the most important elements
out of the file and restoring just those?). Is there
a way to trace the exact point in the export file
where Zope failed (as it is, I get a traceback that
refers to the importing code, but doesn't tell me
what it was chewing on when it choked).
I tried to search the Zope site for some information
on this, but I'm not really sure what I should
be looking for exactly.
Well, anyway, any advice appreciated. I feel like
an idiot, but maybe I'll learn something useful out
of it.
Thanks,
Terry
--
------------------------------------------------------
Terry Hancock
hancock@anansispaceworks.com
Anansi Spaceworks
http://www.anansispaceworks.com
P.O. Box 60583
Pasadena, CA 91116-6583
------------------------------------------------------