Maintaining / Reassigning Direct Relationships When Moving Plone Sites

I am migrating some Plone 4 sites and noticed an issue moving the entire site after migrating. The actual migration is about exact relationships, and other relationships are handled well by migration scripts. But the problem is that my staging environment has a different ZODB mount structure than the target production environment and this seems to break the close relationship. For example, it may appear as / dbXX / mysite and end in / dbYY / mysite, which makes the to_object and from_object RelationValue inaccurate. I looked at 5.intid and it looks like it is database based, which is possibly path dependent?

I was unable to find any information on how to handle this. I am under the impression that this is simply not designed to deal with changes in the path, but I have no way of not changing it here. The path is not arbitrary, it is based on the actual ZODB mount points. I am considering two options for which I would like to solicit feedback:

  • For the background, I move zexp to a staging environment in Plone 4 (identical build to production p4) and then move all Data.fs to a staging environment to Plone 5 (identical to production p5), migrating, then moving zexp to production. When you go from Plone 4 to env, I might have a mirror of the zope path that will be at the final destination. At this point relatedItems etc. Must be based on UIDs and will not change. The downside here is that any close relationships from Plone 4 will break at this point, but I don't think there are many or any of them.
  • Create a mapping of all relationships based on RelationCatalog and rebuild / cleanup. I think I'll do this by noting from_attribute, from_path and to_path and recreating the relationship with the new intids after the last move. At this point, I may need to learn something about the structure of the from_attribute. Any other disadvantages?
+3


source to share





All Articles