How to use Drush aliases?

While Aegir manages Drush aliases for its backend needs, they are normally not available for the main nor the extra shell users on the instance. But starting with 2.2.0, BOA automatically manages copies of all Drush aliases, by adding them, updating or removing, every 5 minutes, once it detects that there are changes applied, like: the site has been migrated to another platform, or associated client/owner has been updated.

You no longer need to 'cd' to the respective site directory to perform some available Drush tasks. Just check the available aliases list with 'drush aliases' and then enjoy the beauty of ‘drush @foo.com command‘ syntax. Still, there are things which may work differently. Thanks to those improvements for Drush based workflows which use Drush on the server, either locally, or remotely over SSH, you can now run (from your desktop or any other server) commands like, for example:

ssh [email protected] 'drush @foo.com sql-dump' > dump.sql
ssh [email protected] 'drush @foo.com cc all'
ssh [email protected] 'drush @foo.com up' «— possible, but don’t use it on live sites!
ssh [email protected] 'drush @foo.com status'

IMPORTANT UPDATE: Unfortunately remote Drush aliases no longer work because we were forced to add restrictions to the limited shell for critical security reasons, which don’t allow chained commands, so it breaks remote aliases. You still can run drush remotely via SSH, but by executing local on the server Drush commands, without using your local Drush copy or aliases.

Create Account or request a free Test Drive
Already 900+ hosts powering thousands of Drupal sites are running on our high-performance Aegir BOA stack
© 2009-2023 Omega8.cc | ul. Zlota 59, 14th floor Skylight Building, 00-120 Warsaw, Poland | Twitter
Smokin’ Fast Drupal Hosting in Amsterdam · Chicago · Frankfurt · London
Madrid · New York · San Jose · Singapore · Sydney · Toronto · Warsaw