This may be a lower level issue, but when running sql-sync with an alias file defined in my site root, drush_sitealias_get_record returns no records.

When I move the aliases file to /etc/drush then the aliases are available.

I am assuming that there is some kind on context init that is not taking place. (But have not dug deeper yet)

CommentFileSizeAuthor
#3 drush-drupal-root-aliases.patch2.09 KBgreg.1.anderson

Comments

greg.1.anderson’s picture

Assigned: Unassigned » greg.1.anderson

I haven't looked at it yet, but I suspect this is in fact a bug. If you put the alias file in your site folder, then whenever you use that site as one target to an sql-sync or rsync, you should also be able to use any alias in that file as the other target. Alias files in the Drupal root should also be available, but my suspicion is that the former works but the later does not. I'll look into it and confirm.

greg.1.anderson’s picture

Priority: Normal » Major
greg.1.anderson’s picture

Status: Active » Needs review
StatusFileSize
new2.09 KB

Here is a patch that allows drush sql-sync @alias @ddd and drush -r /path/to/root @ddd status, where '@ddd' is an alias defined in an alias file at '/path/to/root', and '@alias' is an alias of global scope with a Drupal root at /path/to/root.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Seems reasonable

greg.1.anderson’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.