Loading .zexp file in Plone 5

There was a wonderful rumor at the Plone Conference of individuals who were still using the Import/Export method in Zope to transfer files from a Plone 4 site to a Plone 5 site. I have downloaded several .zexp files from the Plone 4 site, but need to know into which folder to put them in order for Zope on the Plone 5 site to see them. Yes, I performed a search for "import" on the Plone 5 site, but none of those work. Am I missing something?

I can't remember if it was you I was talking to, but the zexp method is only useful for transferring files between sites that are already identical in configuration, e.g. between a site that has been upgraded already to 5, and a brand new 5 site, with all the same add-ons etc.
Transferring files between a Plone 4 site and a Plone 5 one is very unlikely to work.

That said, the zexp file needs to be put in the import folder of the Zope client's "var" home. The name of the folder may vary. In your Plone site's var folder, look for something like "instance" or "client" with varying suffixes, and "import" inside that.

/var/instance/import

PS: I noticed that exporting a site as a zexp from Plone 5 to another Plone 5 did skip some items. It might be the export, because the zexp-file looked too small.

Oh well, it was worth a try.

Thanks!

More than worth a try. It worked!

All that I was importing were folders and files. But it worked like a charm.

Thanks!!

Exactly. ZEXP export/import is not a migration tool - in particular not between major Plone/Zope versions.
This approach is unsupported, not recommended and can lead to various side effects. This is only an option if you know exactly what you are doing (which is not the case here).

-aj

Admittedly, this isn't the best tactic. However, in a pinch, and in small amounts, it might get someone out of a jam. The cumbersome ("pain") factor is enough to dissuade. So is the piecemeal approach.

As for various side effects (e.g., "ghosts in the ZODB"), do you hazard to guess what they are?

Alas, the best laid plans of mice and men...

For posterity...

  1. The .zexp file will load.
  2. You might be able to view the object. How long you might be able to view the object is anyone's guess.
  3. It seems that you can copy/paste the objects into other folders.
  4. Almost certainly you will not be able to edit the object.
  5. Copying/pasting does not "launder" the object.

YMMV, but definitely not the best approach.

Undoubtedly, however, being able to do something like what I just described would be a very handy feature.

Generally speaking, loading a ZEXP from an older version of Plone is equivalent to starting Plone 5 using a Data.fs that came from Plone 4 -- there's a decent chance the data will load, but any upgrade steps that are meant to transform the data for the new Plone version will not have run. In particular, with a migration from Plone 4 to Plone 5 you would end up with content that is still Archetypes-based rather than having been migrated to plone.app.contenttypes.