3

I'm trying to synchronize a production database to two development installations at once, instead of having the production database dumped twice.

In aliases.drush.inc file I'm defining a site-list alias as following:

$aliases['dev'] = array(
  'site-list' => array('@dev1', '@dev2'),
);

$aliases['prod'] = array(
  'uri' => 'default/prod',
  'root' => '/docroot/prod',
  'db-url' => 'mysqli://root:pass@localhost/prod',
);  
$aliases['dev1'] = array(
  'uri' => 'default/dev1',
  'root' => '/docroot/dev1',
  'db-url' => 'mysqli://root:pass@localhost/dev1',
);
$aliases['dev2'] = array(
  'uri' => 'default/dev2',
  'root' => '/docroot/dev2',
  'db-url' => 'mysqli://root:pass@localhost/dev2',
);  

Running a Drush command against any of these aliases works fine.

Running drush @dev status works fine too, and displays the status for both @dev1 and @dev2.

However, trying to execute drush sql-sync @prod @dev gives me the following error:

Error: no alias record could be found for @dev

Do you have any clues?

  • What happens when you run drush sql-sync @prod @dev1? What happens when you run drush sql-sync @prod @dev.dev1? – Refineo Nov 7 '11 at 10:51
  • 1
    Unfortunately, this feature is buggy in Drush and will be removed. Check this out: drupal.org/node/1316378 – Remon Nov 7 '11 at 11:30
  • @Remon You should place that as the answer and close this out then. Looks like you have the correct answer. – chrisjlee Dec 1 '11 at 17:18
2

Seems that this feature is buggy in Drush and will be removed. Check this out: drupal.org/node/1316378

0

copy the DB array from your settings to your aliases file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.