[Zope] Extract Files from ZODB

Jonathan dev101 at magma.ca
Tue Feb 13 13:52:17 EST 2007


----- Original Message ----- 
From: "Carlosfocker" <carlosfocker at gmail.com>
To: <zope at zope.org>
Sent: Tuesday, February 13, 2007 1:25 PM
Subject: [Zope] Extract Files from ZODB


>I have a ZODB that was being used by Plone to store files(Word documents,
> Images, etc.).  Plone is no longer working. I want to extract (retrieve) 
> the
> files from the ZODB. Is this possible? If so, how is this accomplished. 
> Note: I
> cannot access Plone or anything in Plone because it is not working. I am 
> looking
> for a solution that involves working only with ZODB through Zope, not a
> procedure that attempts to troubleshoot Plone.

If the documents were stored as 'Files' then you can do a search by 
meta-type:

for fileObj in container.objectValues('File'):
   <do something with the file>

You would need to recurse through your directory (folder) structure to get 
every file (unless they were stored in known folders).


Jonathan 



More information about the Zope mailing list