Ok, I'm confused. I have two site alias files in my .drush folder. One works fine, the other doesn't.

Here's the one that doesn't:

$aliases['drnet.prod'] = array('root' => '/home/corion/prod/davidreagan.net','remote-host' => 'aetwirk.com','remote-user' => 'corion',);

$aliases['drnet.dev'] = array('uri' => 'dev/davidreagan.net/','root' => '/home/david/dev/davidreagan.net',);

When I run drush sql-sync @drnet.prod @drnet.dev I get:

david@selenium:~/dev/davidreagan.net$ drush sql-sync @drnet.prod @drnet.dev
The command could not be executed successfully (returned: bash:      [error]
drush: command not found
, code: 127)
The command sql-sync could not be initialized.                       [error]
david@selenium:~/dev/davidreagan.net$ 

The one that works has exactly the same syntax, and no extra options. I'd show it to you, but it's for my work's site.

Oh, and to top it off, sql-conf works just fine for both drnet sites.

So, what is going on? Is there more information I can get that will help figure this out?

Comments

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)

Are you testing sql-conf from the same machine that the sql-sync is failing on?

Useful tests include:

drush @drnet.prod sql-conf
drush @drnet.prod status
drush sa @drnet.prod --with-db

Seems that my brain should be able to remember the reason why sql-sync might fail when sql-conf works, but it can't right now. In theory, if sql-conf works, then sql-sync should be good to go, but I have some vague memory of a situation where that was not the case. Run your commands with --debug and see if that gives you more information.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.