zexp import fails from linux to windows due to image file paths
Hi, I have an old zope based site that was hosted on a linux machine that was exported to a zexp. i am trying to import it onto a windows machine to fix up and upgrade the site. the windows machine is setup wth the identical products etc. The problem is the image file paths for linux within the zexp do not match the new windows setup. I dont need the images imported, i'm wanting to access the main site content and users. I dont have access to a linux machine anymore, so i'm stuck with windows for development. Is there a way of getting the import procedure to ignore the errors and continue the import (i.e. any hints on how to modify the zope code)? Or is there a way to edit the zexp to do a search & remove/replace of the file path names so the import completes with no file path details? Any ideas greatly appreciated as I have searched around with no luck on answering this myself. Thanks
From: "Richard Ettema" <richard@calibrationconnect.co.nz>
with windows for development. Is there a way of getting the import procedure to ignore the errors and continue the import (i.e. any hints on how to modify the zope code)? Or is there a way to edit the zexp to do a search & remove/replace of the file path names so the import completes with no file path details?
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.
Quoting Jaroslav Lukesh <lukesh@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
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@calibrationconnect.co.nz> wrote:
Quoting Jaroslav Lukesh <lukesh@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@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 )
Richard Ettema schrieb:
Hi,
I have an old zope based site that was hosted on a linux machine that was exported to a zexp. i am trying to import it onto a windows machine to fix up and upgrade the site. the windows machine is setup wth the identical products etc. The problem is the image file paths for linux within the zexp do not match the new windows setup. I dont need the images imported, i'm wanting to access the main site content and users. I dont have access to a linux machine anymore, so i'm stuck with windows for development. Is there a way of getting the import procedure to ignore the errors and continue the import (i.e. any hints on how to modify the zope code)? Or is there a way to edit the zexp to do a search & remove/replace of the file path names so the import completes with no file path details?
Any ideas greatly appreciated as I have searched around with no luck on answering this myself.
i do not think that it is the zexp import machinery that fails but the product that handles these external images. so you have to fix that product that it does not chocke when it can not read a file. robert
i do not think that it is the zexp import machinery that fails but the product that handles these external images. so you have to fix that product that it does not chocke when it can not read a file.
robert
Hi, Thanks for all your replies. Robert, I modified the products causing the errors as you suggested and was able to import the zexp without any problems, thanks! Richard.
participants (4)
-
Jaroslav Lukesh -
Richard Ettema -
robert rottermann -
Tim Nash