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 getting this error when upgrading:
Initialized Drupal site drupal_upgrade at sites/drupal_upgrade [notice]
Command site-upgrade-prepare needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command. [error]
The drush command 'site-upgrade-prepare adminrole admin_menu content email fieldgroup filefield imagefield link linkimagefield nodereference number optionwidgets text userreference [error]
custom_search custom_search_blocks custom_search_taxonomy date date_api date_locale date_popup date_timezone imageapi imageapi_gd imagecache imagecache_ui markdown spamspan mobile_tools
i18nblocks i18n i18nstrings nodequeue nodequeue_randomizer smartqueue service_links general_services widget_services ed_readmore auto_nodetitle better_formats unlimited_css job_queue
lightbox2 node_adoption pathauto poormanscron quotes config_perms token token_actions transliteration antispam googleanalytics jquery_ui insert_view views views_export views_ui framework
journal-21-mobile' could not be executed.
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.
Drush was attempting to connect to :
Drupal version : 6.28
Site URI : drupal_upgrade
Database driver : mysql
Database hostname : 127.0.0.1
Database username : drupaluser
Database name : drupal_upgrade
Default theme : garland
Administration theme: garland
PHP configuration :
Drush version : 5.4
Drush configuration: /Users/username/.drushrc.php
Drupal root : /Users/username/Sites/drupal
Site path : sites/drupal_upgrade
Modules path : sites/all/modules
Themes path : sites/all/themes
%paths : Array
You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or $options['uri'] in your drushrc.php file.
Command dispatch complete [notice]
This is how I call the upgrade:
drush site-upgrade @onward --auto --verbose
And this is my drush.aliases.inc:
<?php
$hosts = '/Users/username/Sites/';
$domain = 'drupal_upgrade';
$alias = 'drupal_upgrade';
$aliases['onward'] = array(
'root' => '/Users/username/Sites/drupal_upgrade',
'uri' => 'http://drupal_upgrade:8082',
'default' =>array (
'default' => array (
'database' => 'drupal_upgrade',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => '33066',
'driver' => 'mysql',
'prefix' => '',
),
),
);
?>
Am I doing something wrong?
Comment | File | Size | Author |
---|---|---|---|
#10 | sup.txt | 14.96 KB | Lukas von Blarer |
#5 | drush-sup-4.txt | 32.86 KB | Lukas von Blarer |
#3 | drush-sup-3.txt | 22.89 KB | Lukas von Blarer |
#1 | drush-sup.txt | 25.43 KB | Lukas von Blarer |
Comments
Comment #1
Lukas von BlarerAnd this is the full debug output
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedIf your source site is defined by the alias @d6, then call site-upgrade like this:
Alternately, cd to the directory that contains your source sites' settings.php file, and run your site-upgrade command as you were doing before.
Hint: Don't use --auto until you have the basics working! The prompts can be helpful.
Also, I don't see the intended purpose of the following lines; these do nothing.
Comment #3
Lukas von BlarerYes, I executed the command in the root directory of the source site.
The three lines at the top don't do anything in the example. I use them locally to set the values of all site aliases. I had to anonymify the scripts to post them on d.o.
I did now try with an alias for the source site as well without the auto option:
drush @d6 site-upgrade @onward --verbose
And it failed again:
It seems to confuse the source and the destination db. After the script finishes both my source and my destination databases are empty.
This is my current aliases file:
Where could this be coming from?
Comment #4
Lukas von BlarerI fixed the permission problem, but the issue still persists. "You will destroy data from drupal_d6 and replace with data from drupal_d6." Something is not right... Again, afterwards both databases are empty.
Comment #5
Lukas von BlarerAnd the full debug log.
Comment #6
greg.1.anderson CreditAttribution: greg.1.anderson commentedFrom your logs:
Make sure that drush_sup can write the settings.php file in the target site.
Comment #7
Lukas von BlarerThe run in #4 already fixed that, right?
Comment #9
greg.1.anderson CreditAttribution: greg.1.anderson commentedSorry, mis-read the report in #6; this is still active. Have you solved your problem yet? I'm not sure why drush sup is confused about the database name to use for the target. As a test, try removing the database definition from the target alias file, and let drush sup generate the target database name. If that works, then there is a bug in the target alias determination code. I mostly used auto-generated target db names, so that's possible.
Comment #10
Lukas von BlarerI was just testing sup for that site... But I ran it again without the database definition and still got errors:
Comment #11
greg.1.anderson CreditAttribution: greg.1.anderson commentedMy best guess is that the user you are running the site upgrade does not have the right to create a new database. Maybe pre-create the database identified in the output at the end of sup.txt in #10, or, failing that, run again in --debug mode, and post output around the area where drush sup is creating the database.