November 25, 2020

Plone migrations: exporting a Plone site using collective.jsonify (Part 2)

Plone migrations: exporting a Plone site using collective.jsonify (Part 2)

In this blog post, I describe to how to use collective.jsonify for exporting a Plone to JSON.

Buildout preparation

  • install collective.json (we are using our ugent-fixes branch. This branch will be merged back into the master branch soon)
[buildout]
sources = sources
auto-checkout =  
   collective.jsonify

[instance]

eggs +=
   collective.jsonify

[sources]
collective.jsonify = git git@github.com:collective/collective.jsonify.git branch=ugent-fixes  

Installation of collective.jsonify inside your Zope/Plone installation

bin/instance run src/collective.jsonify/collective/jsonify/scripts/install_migration.py

Run the migration export

bin/instance run src/collective.jsonify/collective/jsonify/scripts/migration_export.py <plone site id>

You will see some output similar to

2020-11-25 15:40:59 WARNING collective.jsonify export >> Directory /tmp/content_test_2020-11-25-15-40-59

Depending on the site of your Plone site and the number of Plone object, the export may take a while. An export on a larger customer site with 100.000 objects and 60 GB data, an export took about 90 minutes...these numbers may vary depending on disk and CPU speed. The export will generate an export directory in /tmp (by default). The directory name is based on the Plone site ID and a timestamp. You can specify a different export directory by setting the $EXPORT_DIR directory.

The next blog post will cover the aspect of setting up ArangoDB as migration data and importing the exported JSON data into ArangoDB.