Drush sql-sync not working on multisite I use drush site aliases and drush sql-sync as part of my daily workflow between my local development environment and my company's production/staging servers (Acquia dev cloud). This works great for single site instances, but I haven't been able to get it to work with multisites. 

Example site structure for my @remote alias: 

@remote
  - default.com ``drush @remote`` &lt;-- commands not targeted with `-l` execute here
  - sitename.com ``drush @remote -l sitename.com status``
  - foobar.com ``drush @remote -l foobar.com sql-connect``


For other drush commands, I can target the multisite that I want use the -l switch to specify a particular multisite, and I get the correct output for drush status and drush sql-connect (correct URI and Database name). 

However, when I try to use -l with drush sql-sync, it just targets the root site, no matter what. I can get around this by manually dumping the database and doing drush sql-cli @remote -l multisite.com &lt; db.sql, but it's not half as quick as just doing drush sql-sync @local -l sitename.com @drush.remote -l sitename.com

I can open up a drush issue queue if this is a bug, but I'm wanted to check and see if I was doing something wrong first. Thanks!
It is true that mixing @alias and -l together does happen to work in the local case, but is not supported in sql-sync.  If this did work, you would need to use --target-uri and --source-uri to distinguish the two different -l/--uri options, but this has never been implemented.  Drush always uses the source and target alias records, and nothing else, to determine how to look up the source and target database records.

As Clive says, the best thing to do it so set up separate aliases for each site.  If you put all of your aliases in a single file, they will automatically create an alias group.

For example, I do something like this:

sitename.aliases.drushrc.php:

&lt;?php

$aliases['live'] = array (
  'parent' =&gt; '@server.urpad',
  'root' =&gt; '/srv/www/sitename/htdocs',
  'uri' =&gt; 'http://sitename.com',
}

$aliases['dev'] = array (
  'root' =&gt; '/srv/www/sitename/htdocs',
  'uri' =&gt; 'http://sitename.com',
}


server.aliases.drushrc.php:

&lt;?php

$aliases['urpad'] = array (
  'remote-host' =&gt; 'my.remote-server.org',
  'remote-user' =&gt; 'www-admin',
}


Using a 'server' alias file allows me to easily specify where I want to put each remote site without having to duplicate the remote host information.

Then, to use it:

drush sql-sync @sitename.live @sitename.dev