[Zope] zexp import fails from linux to windows due to image filepaths

Tim Nash thedagdae at gmail.com
Thu Jul 17 19:24:03 EDT 2008


You can use this to edit the zexp on the command line. It is from the
cygwin build system.

perl -pe 'BEGIN{binmode(STDIN); binmode(STDOUT);};
s/oldtext/newtext/g'  < copy_of_your.zexp  > fixed_copy_of_your.zexp

then rename fixed_copy_of_your.zexp to the original zexp name and
import it into a NON-Production version of zope.

I have used this to edit binary data but I've not tried the zexp
import. Be careful because it looks like ExportImport.py in ZODB will
try to register any python pickle that begins with ZEXP.  This could
really mess up your data.

Unfortunately there doesn't seem to be many zexp manipulation scripts available.

Good luck!
Tim


On 7/16/08, Richard Ettema <richard at calibrationconnect.co.nz> wrote:
> Quoting Jaroslav Lukesh <lukesh at seznam.cz>:
>
>>
>> You need to export your website folder as ZEXP in XML format. Then you
>> could edit this file at search/replace basis. But before this, try to
>> re-import this ZEXP file, if it is able to import (not all zexp exports
>> are able to reimport).
>>
>> Regards, JL.
>
> Thanks for the reply JL, re-importing into the original server and
> exporting in XML is not an option as I don't have the server anymore,
> only a Windows machine.
> If editing the existing ZEXP is not possible, is it possible to modify
> the actual zope code temporarily, to ignore the mismatch of file paths
> (or to modify the paths from linux to windows during the import
> process)?
> Thanks, Rich
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


More information about the Zope mailing list