Entity Migrate Export (EME) is a Drupal (8|9|10) to Drupal (8|9|10) migration generator tool. With this module, you are able to export entity instances of the specified content entity types into migrations. Every content entity referred by a reference field will also be included.

EME generates a module with a set of migration plugin definitions and data sources. After installing the generated module (its name defaults to eme_content), you will be able to import the entities (e.g. nodes, files, media, comments etc) with Migrate Tools or with Drush 10.4.0+.

This module does not depend on any contrib module. However, the generated migrations (and the module as well) require Migrate Plus.

Usage

Exporting content

From UI

  • Visit the Settings form at /admin/config/development/entity-export/settings and customize the default settings based on your needs.
  • Go to the export form at /admin/config/development/entity-export, select which type of entities do you want to export to migrations, and submit the form.
  • At the end of the batch process, you will get the generated migration module.

With Drush

  • drush eme:export \
      --id my_project_dev \
      --types node,block_content
    

    This is equivalent to:

    drush eme:export \
      --module my_project_dev_content \
      --group my_project_dev \
      --id-prefix my_project_dev \
      --types node,block_content \
      --name 'My Project Dev Content Entity Migration' \
      --destination modules/custom

Import the migrations 

  • Install Migrate Tools and Migrate Plus.
  • Enable the generated module (its default name is eme_migrate).
  • Execute the migrations with the group name (group defaults to eme):
    drush migrate:import --tag my_project_dev --execute-dependencies

Update previous export

From UI

  • Go to the collection form at /admin/config/development/entity-export/collection.
  • Press the "Reexport" button of the collection you want to update with new content.

With Drush

  • drush eme:export --update my_project_dev_content
Supporting organizations: 
Maintenance

Project information

Releases