I'm working with the Migrate Tools modules for the first time. Specifically, I'm trying to use the Migrate Upgrade module to import users and roles from an old Drupal 7 site to a new, Drupal 8 rebuild of that site.
Per these instructions, I'm running this command to configure the migrations:
drush migrate:upgrade --legacy-db-url=mysql://olduser:password@localhost/oldschema --legacy-root=http://olddomain.test:8888 --configure-only
When I run drush migrate:status upgrade_d7_user,upgrade_d7_user_role
immediately after that command, here's what I see:
----------------------------------------- ---------------------- -------- ------- ---------- ------------- ---------------
Group Migration ID Status Total Imported Unprocessed Last Imported
----------------------------------------- ---------------------- -------- ------- ---------- ------------- ---------------
Import from Drupal 7 (migrate_drupal_7) upgrade_d7_user_role Idle 4 4 0
Import from Drupal 7 (migrate_drupal_7) upgrade_d7_user Idle 197 196 0
----------------------------------------- ---------------------- -------- ------- ---------- ------------- ---------------
This isn't what I expect to see. It looks like it has already imported all roles and all users (except for the admin user), and has none left to process. I expect to see zero imported at this point, since I used the --configure-only
flag, and I haven't yet issued the Drush command to actually run the migrations.
Looking in the Drupal backend, I don't see that anything has actually been imported.
If I go ahead and run these commands:
drush migrate:import upgrade_d7_user_role
drush migrate:import upgrade_d7_user
...then I see:
[notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_user_role'
[notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_user'
It seems like the Migrate Tools thinks that the imports have already been completed – but they haven't.
Any ideas? Has anyone run into anything similar before?
I have been restoring the new (target) site's database from a snapshot periodically, because I'm learning the migration process as I go. So maybe that has hosed something up.
The very first time I ran migrate:status
, I saw what I expected – some records queued, but none imported yet.
And the first time I ran migrate:import
, it did import the records as expected.
So it seems like something about that previous import got "stuck" somewhere in the system. But I've taken increasingly drastic measures to burn my development site to the ground and rebuild from scratch – to no avail.
Is there perhaps something being cached by the Drush CLI itself?
Appreciate any suggestions. Thanks.