Friday 26 January 2007 7:37:45 pm
Last week I was migrating content from one to another eZ publish installation through standard import/export package functionality. Here are some of my conclusions I want to share: Import/export script heavily relies on remote_id. If you have previously imported content with the extensions which do not take care about uniqueness of remote_id, you should regenerate this values before exporting content to the package with something like this:
update ezcontentobject set remote_id=md5(concat(now(),id, rand()));
update ezcontentobject_tree set remote_id=md5(concat(now(),node_id, rand()));
Import of the package is not a transactional operation - make a backup before importing content package. Current stable 3.8.6 release has problems with the import of ezdatetime attribute, which is fixed in 3.8.7, so replace the /kernel/classes/datatypes/ezdatetime/ezdatetimetype.php with the version from SVN. I also had problems with custom sections, so I applied standard section to whole content before exporting it ( http://issues.ez.no/IssueView.php?Id=9840&activeItem=1 ) Packages do not preserve the real owner of the object or published/modified values. This is really nasty if you copy forum topics/replies, for example. So I had to write some simple php scripts which use remote_id to set the real owner_id in the new database and to sync publish/modified values. Largest package I have successfully imported had 5000 content objects. (don't forget to raise timeouts like max_execution_time to at least 2 hours for large packages like this). I hope some will find this useful :)
http://www.netgen.hr/eng
|