Get objects from ZODB into MySQL

Diez B. Roggisch deets at nospam.web.de
Mon Apr 27 18:20:21 EDT 2009


TheIvIaxx schrieb:
> Hello, I have searched for some solution to getting the object data
> from a ZODB Data.fs file into something i can work with for MySQL.  So
> far, no such luck.  I can open the DB and poke around, but im not sure
> where or what to even poke :)
> 
> It was a simple plone site, with mainly Pages/Documents (the basic
> content type).  I would imagine getting the object information into
> some sort of csv or txt format would be easy.  I can't really find
> anything in the ZMI that would do what i need either.
> 
> Any ideas on this?  Where in the DB are these objects stored and how
> to retrieve them?

The ZODB is essentially a persisted object graph. Not more, not less. In 
other words: there is no way to extract any "raw" data, all are 
python-objects. To persist these, you need to write a serialization of 
these objects to something that you can process further. XML-pickling 
might be an option. Or you write some generic thing based on dir() or 
__dict__.

Diez



More information about the Python-list mailing list