What is this module?

This module is used to export content entities and import content after a complete installation.
It also be used to synchronise content between two different platform.

This module provide in details:

A configurable export

  • Destination folder
  • Entity types / bundles allowed to be exported

An entity export

  • Drush command to do the export (drupal console command planned)
  • Single language or Multi languages

An entity import

  • Drush command to generate all migration entities regarding the module configuration (destination folder / entity types and bundle choice)
  • Use drush migrate commands to do the import.
  • Process definition for each field types in migration entity (basic field, entity reference field, ...), easily overridable (EventDispatcher)

Compatibility

This module allows to export ALL Entities that implements the ContentEntityTypeInterface

How does it work?

Exporting content:

  1. After enabling this module, go to /admin/config/system/content-staging:
  2. - Choose all entity types / bundles you want to export the content
    - Change the default content staging directory ('../staging' by default).
    This directory is relative to the drupal root.

  3. Run the drush command: $ drush export-content (ex)
  4. Don't forget to export the entity_staging configurarion (entity_staging.settings.yml)

Importing content:

  1. Run the drush command to update migration entities regarding the previous configuration: $ drush update-migration-config (umc)
  2. Run the migration:
    • for creation only: $ drush migrate:import --group=entity_staging
    • for creation and update: $ drush migrate:import --update --group=entity_staging

Requirements

migrate_plus (>= 4.0)
migrate_tools (>= 4.0)

Special thanks to:

  • FGM for the initial idea (2 years ago at FTV)
  • bpresles for the many tests
Supporting organizations: 

Project information

Releases