Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drush sql-sync multisite #2064

Open
darkogav opened this issue Mar 11, 2016 · 2 comments
Open

drush sql-sync multisite #2064

darkogav opened this issue Mar 11, 2016 · 2 comments

Comments

@darkogav
Copy link

Hello, I suspect I am doing something wrong, but not sure.

Trying to run a sql-sync command fails.

Drush Version : 8.0.1

Below is the error I get.

Loaded alias @dev from file /root/.drush/aliases.drushrc.php                                                                                                                                                                      [notice]
You will destroy data in dp_test and replace with data from dp_dev
Do you really want to continue? (y/n): y
Starting to dump database on Source.                                                                                                                                                                                               
Unable to load class Drush\Sql\Sql                                                                                                                                                                                                 [error]
exception 'Drush\Sql\SqlException' with message 'Unable to find a matching SQL Class. Drush cannot find your database connection details.' in phar:///usr/local/bin/drush/commands/sql/sql.drush.inc:587                           [error]
Stack trace:
#0 phar:///usr/local/bin/drush/commands/sql/sql.drush.inc(264): drush_sql_get_class()
#1 [internal function]: drush_sql_dump()
#2 phar:///usr/local/bin/drush/includes/command.inc(364): call_user_func_array('drush_sql_dump', Array)
#3 phar:///usr/local/bin/drush/includes/command.inc(215): _drush_invoke_hooks(Array, Array)
#4 [internal function]: drush_command()
#5 phar:///usr/local/bin/drush/includes/command.inc(183): call_user_func_array('drush_command', Array)
#6 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(65): drush_dispatch(Array)
#7 phar:///usr/local/bin/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#8 phar:///usr/local/bin/drush/includes/startup.inc(289): drush_main()
#9 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#10 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#11 {main}
Command dispatch complete                                                                                                                                                                                                             [notice]
sql-dump failed.                                                                                                                                                                                                                   [error]
Command dispatch complete

I have a multi site setup.

So my Drupal root does not actually point to the same location as where my multisite is installed. It points one level up as per below.

Drupal root : /var/www/sites/test.localdomain.ca/htdocs

Drupal root : /var/www/sites/dev.localdomain.ca/htdocs

The subsites are actually installed in
/var/www/sites/test.localdomain.ca/htdocs/sites/subsite.localdomain.com/

Is this error because i have to use symlinks in the multisite setup?

@weitzman
Copy link
Member

No idea. Please

  1. Update to latest Drush on both sides of the sql-sync (assuming one host is remote)
  2. share your command and log output with --debug
  3. share the contents of any aliases. use drush sa @aliasname

@alex-moreno
Copy link

I'm having this same issue. sql-conf, sql-dump, sql-cli... everything works fine but sql-dump

Is drush sql-sync supported in multisite environments?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants