Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am following the instructions here: https://www.drupal.org/node/2350651 with Drupal 8.1.2 and migrate_tools 8.x-2.0-beta1 (as this is the recommended version). When I run drush migrate-import --all
I get the following:
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_block_content_type'
Migration upgrade_contact_category did not meet the requirements. [error]
Missing source provider contact source_provider: contact.
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration upgrade_d6_url_alias did not meet the requirements. Missing [error]
source provider path source_provider: path.
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_contact_category'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_date_formats'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_dblog_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_file_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_search_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_statistics_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_cron'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_date'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_file'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_image'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_image_gd'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_logging'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_maintenance'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_performance'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_rss'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_system_site'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_url_alias'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_user_mail'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_d6_user_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_menu_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_search_page'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_taxonomy_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_text_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_update_settings'
Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done [status]
with 'upgrade_block_content_body_field'
Migration upgrade_d6_contact_settings did not meet the requirements. [error]
Missing source provider contact source_provider: contact.
Migration upgrade_menu did not meet the requirements. Missing source [error]
provider menu source_provider: menu.
Migration failed with source plugin exception: Driver not specified [error]
for this database connection: drupal_6
exception 'Drupal\Core\Database\DriverNotSpecifiedException' with [error]
message 'Driver not specified for this database connection: drupal_6'
in
-----/code/core/lib/Drupal/Core/Database/Database.php:365
Stack trace:
#0
-----/code/core/lib/Drupal/Core/Database/Database.php(166):
Drupal\Core\Database\Database::openConnection('drupal_6', 'default')
#1
-----/code/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php(130):
Drupal\Core\Database\Database::getConnection('default', 'drupal_6')
#2
-----/code/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php(93):
Drupal\migrate\Plugin\migrate\source\SqlBase->setUpDatabase(Array)
-----/code/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php(138):
Drupal\migrate\Plugin\migrate\source\SqlBase->getDatabase()
#4
-----/code/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php(21):
Drupal\migrate\Plugin\migrate\source\SqlBase->select('filter_formats',
'f')
#5
-----/code/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php(242):
Drupal\filter\Plugin\migrate\source\d6\FilterFormat->query()
#6
-----/code/core/modules/migrate/src/Plugin/Migration.php(561):
Drupal\migrate\Plugin\migrate\source\SqlBase->count()
#7
-----/code/core/modules/migrate/src/Plugin/Migration.php(489):
Drupal\migrate\Plugin\Migration->allRowsProcessed()
#8
-----/code/core/modules/migrate/src/MigrateExecutable.php(184):
Drupal\migrate\Plugin\Migration->checkRequirements()
#9 [internal function]: Drupal\migrate\MigrateExecutable->import()
#10 /opt/pantheon/drush-8/includes/drush.inc(720):
call_user_func_array(Array, Array)
#11 /opt/pantheon/drush-8/includes/drush.inc(711):
drush_call_user_func_array(Array, Array)
#12
-----/code/modules/migrate_tools/migrate_tools.drush.inc(269):
drush_op(Array)
#13 [internal function]:
_drush_migrate_tools_execute_migration(Object(Drupal\migrate\Plugin\Migration),
'upgrade_d6_cust...', Array)
#14
-----/code/modules/migrate_tools/migrate_tools.drush.inc(235):
array_walk(Array, '_drush_migrate_...', Array)
#15 [internal function]: drush_migrate_tools_migrate_import()
#16 /opt/pantheon/drush-8/includes/command.inc(366):
call_user_func_array('drush_migrate_t...', Array)
#17 /opt/pantheon/drush-8/includes/command.inc(217):
_drush_invoke_hooks(Array, Array)
#18 [internal function]: drush_command()
#19 /opt/pantheon/drush-8/includes/command.inc(185):
call_user_func_array('drush_command', Array)
#20 /opt/pantheon/drush-8/lib/Drush/Boot/BaseBoot.php(67):
drush_dispatch(Array)
#21 /opt/pantheon/drush-8/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#22 /opt/pantheon/drush-8/drush.php(12): drush_main()
#23 {main}
[2016-06-15 04:45:55] [error] Either we could not connect, or Drush has exited with code 1
client: 'Drush'
code: 1
I can run drush migrate-upgrade
and the Drupal 6 content is migrated (albeit fields and taxonomy terms are missing from nodes).
What am I missing here?
Comments
Comment #2
mikeryanSo, presumably you ran drush migrate-upgrade --configure-only with --legacy-db-url looking something like mysql://user:pass@host/dbname, correct? Make sure you have the Configuration Manager module installed, go to /admin/config/development/configuration/single/export, select a configuration type of Migration Group, and select the migrate_drupal_6 group. What does the database definition (under shared_configuration: source:) look like? Is it a proper specification for your source database?
Comment #3
mikeryanJust as an example, running a --configure-only in my dev environment just now, it looks like this:
Comment #4
Matt BThanks Mikeryan
I'm sure that I did not have to specify the --legacy-db-url parameter when I attempted this on previous versions of Drupal 8 core and migrate-tools and it worked fine. I've configured the database connection information in settings.php (see https://www.drupal.org/node/2551147). I take it migrate-tools and migrate-upgrade no longer use this information and it has to be specified in the drush command?
I'll check tonight when I'm back from work.
Comment #5
mikeryan@Matt B: Check that the key: in your group settings matches the connection name in your settings.php, and also be sure the driver key is specified for your database in settings.php.
Comment #6
Matt BThankyou mikeryan
My settings.php now has something along these lines:
and I specified the --legacy-db-url parameter with migrate-upgrade --configure-only.
Is there a reason the same information needs to be in settings.php and on the drush command line? Or is there a reasonable feature request that the information is only entered in one place?
Thank you again, and for all your work on Drupal 8 migrations.
Comment #7
mikeryanIt does not need to be in settings.php - the normal workflow is to use --legacy-db-url and --configure-only to put the database configuration in the migration group.