Best way of reimporting content in fresh site when migration is difficult

HI everyone.

I wan't to migrate a Plone site version 5.0.7 to latest 5.2. In a previous attempt some months ago I could not succed migrating it to 5.1.5

I thought that perhaps exporting my content (mostly thousands of news itens) and importing it in a fresh site would be a good practice, instead of battling several errors cause I used some addons.

The last time I searched on how to do this I found the instructions about the transmogrifier. Is this still the way or has something new (and easier) surged? I remember trying to run it but stumbling in errors I could not solve.

I wan't to do a new try, what can you advice me?

Thanks

Rafael

Thanks,

Rafael

Why is the standard Plone migration not working? If there are issues, please be specific instead of coming with „does not work“.

Not sure if it is a good idea, but could it be possible to make a new Plone site on the same Zope and cut / paste the objects to the new site in the ZMI. Then rebuild the catalog and delete the old Plone site ?

You can:

  • Use the in-place migration of Plone (good for simple use cases, when source/target use the same set of add-on products and the first option I'd try)
  • Export/import via ZEXP (only works for a very narrowed use case if source/target are almost identical, error prone and fragile but a quick and easy option if it works)
  • Export/import via Plone REST API (best in combination with Transmogrifier IMHO, import/export is not symmetric which makes simple export/import hard)
  • Export/import via Transmogrifier (best option for complex and large migrations, scales, is configurable, requires more initial work than others but it is worth it IMHO)

Every approach has pros and cons and it is impossible to give a recommendation without more information about your use case. I personally use Transmogrifier based migrations for all our projects. Though, our projects usually tend to be larger and more complex migration projects and for those I'd always recommend a Transmogrifier-based approach.

@rafaeltcc As Timo wrote it very much depends on your project. If it is a simple and mostly default site you should be able use the default migration without any issues. For complex projects with a lot of custom features other options can be the better choice.

We can't really help you unless you tell us a) what the site you are trying to migrate holds and b) which problems you encountered during the upgrade.

Keep in mind that for Plone 5.2 your final site should run on Python 3 which means you'd need to upgrade to 5.2 first and then migrate the database to Python 3.

You should read https://docs.plone.org/manage/upgrading/version_specific_migration/index.html and maybe watch https://www.youtube.com/watch?v=ZIN1qmhMHJ4.

If you only want to migrate some content then you could export them as json (e.g. using the restapi, https://github.com/collective/collective.contentexport or your own code) and write a view that imports that json as content. Also ZEXP-Export/Import could still work for individual folders (not the whole site) from 5.0 to 5.2.