Score:0

Using Drush 10 and sql-sync with path based sites not working

in flag

We have two websites running off a single domain:

https://www.mywebsite.com

https://www.mywebsite.com/mywebsitetools

Both websites have their own databases and are hosted by Acquia.

We've been using Drush 8.x and the sql-sync command for the past number of years to synchronizing the database between the local environment and Acquia.

Last week we upgraded to using Drush 10.3.6 and now we're running into an issue with the sql-sync command where it used to be able to target the db in the multi-site environment it now will only sync the main db.

# Application 'mywebsitetools', environment 'dev'.
dev:
  root: /var/www/html/mywebsitedev/docroot
  ac-site: mywebsitetools
  ac-env: dev
  ac-realm: prod
  uri: mywebsitedev.prod.acquia-sites.com/mywebsitetools
  dev.livedev:
    parent: '@mywebsitedev.dev'
    root: /mnt/gfs/mywebsitedev.dev/livedev/docroot/sites/mywebsitetools
  host: mywebsitedev.ssh.prod.acquia-sites.com
  user: mywebsitedev.dev
  paths:
    drush-script: drush9

I then run the following sql-sync command to sync the databases

drush sql-sync @mywebsitetools.dev -l mywebsitetools @local.mywebsitetools -l mywebsitetools

I then get the following response back:

You will destroy data in mywebsite and replace with data from mywebsitedev.ssh.prod.acquia-sites.com/mywebsite.

Which tells me that Drush is going to sync the database for the https://www.mywebsite.com website instead of the https://www.mywebsite.com/mywebsitetools. Sure enough if I execute the command it takes about 15 minutes to sync the db and when i check /usr/local/var/mysql i can see that the date modified value of the mywebsite folder has changed as well as all the tables within the folder.

Using Drush 8.x and the old php aliases I would get a message like:

You will destroy data in mywebsitetools and replace with data from mywebsitedev.ssh.prod.acquia-sites.com/mywebsitetools.

And because this database is about 2MB it would take less than 2 minutes to sync.

I've spoken with the folks at Acquia Support and they suggested posting here because they haven't run into this issue either.

Any help figuring this out would be greatly appreciated.

many thanks,

devin

sonfd avatar
in flag
Does it work if you pass the whole URI with the -l option?
in flag
unfortunately it does not, it still wants to sync the mywebsite database instead of the mywebsitetools database.
in flag
did you ever figure this out? I am on acquia too and running into this problem
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.