Very often in a migration of Drupal 6/7 to Drupal 8, have a need to run and test the migration many times. This applies more to sites that are very active, where site editors are updating or adding new content.
Keep in mind that the Migration API in Drupal 8 offers a few paths to run migrations. The first is a user interface to make migrations through the path /upgrade
. Through this method, the migration process is once and you can not make any customizations.
The other method is to use drush to upgrade. And it is done by using these steps:
- Generate migration configuration. Example:
drush migrate-upgrade --legacy-db-url=mysql://root:root@localhost/drupal6 --legacy-root=/var/www/drupal6 --migration-prefix=”” --configure-only)
- Migrating structure and configuration of the old site, eg variables, blocks, vocabularies, content types, etc. Example:
drush migrate-import --tag=Configuration
- Make configuration changes generated by migration. Example: revert the default text in Drupal 8's default email welcome messages for new user that were changed by migration. Make other changes as necessary too. Then export the configuration. Example:
drush config-export
- Finally migrate all content of nodes, terms of taxonomies, etc. Example:
drush migrate-import --tag=Content
In a normal flow, step # 1 is executed only once to generate all migrations. Step # 2 is run and iterated upon a few times until the settings for the new site are all right. But after a stable configuration is establed, it can be ignored by the rest of the process once we have stored all the generated configuration in step #3. Finally, step #4 can easily be executed more than once.
With the attached patch, it is possible to do all the points above, migrations are generated and a tag type assigned to each migration depending on its type. Configuration for migrating Configuration and Content for migration of content. This is a game changer. You can now migrate all the configuration of a site, get sign-off on the site structure with a sample of content, then schedule a go-live data to pull over all the remaining content. Before, this it was terribly difficult and laborious to figure out what was content and what was site configuration. Now that isn't a problem.
Are you looking for help with a Drupal migration or upgrade? Regardless of the site or data complexity, MTech can help you move from a proprietary CMS or upgrade to the latest version–Drupal 8.
Write us about your project, and we’ll get back to you within 48 hours.