I have many servers installed on the same network, and I want to check them all to see if they need updates. This requires me to login to each server and run drush up and check the results.

Can someone suggest a better way to do this, maybe a script or something similar?


You can add Drush Aliases for each site, and then add an alias containing all your sites.


$ drush @allsites up

| improve this answer | |

First step: upgrade to drush-5.x-dev. Next, make one alias file per site called SITENAME.aliases.drushrc.inc, placing each in a valid location for aliases. Inside each of these, define your alias for your live site in a consistent way:

$aliases['live'] = array(
  'uri' => ...
  'root' => ...

In drush-5.x-dev, any operation on the special group alias @live will execute on all aliases named "live", so you can just do this:

drush @live --no pm-updatecode

That will give you a nice report tagged with the name of each of your live sites. On Drush 4 (or Drush 5), you can also explicitly define an alias list:

$aliases['all-live'] = array(
  'site-list' => '@site1.live', '@site2.live'

The usage of this alias would then be the same as before:

drush @all-live --no pm-updatecode

In order for this to work seamlessly, you will also need to set up ssh keys on your remote systems so that Drush can connect without a password. There's a lot of good documentation on how to do this, such as http://www.debian.org/devel/passwordlessssh. Also, the drush-extras project has a Drush command that will help push public keys to remote servers.

| improve this answer | |
  • Also try the new status-report command in drush-5, which will give you a quick way to view the status report page of your remote sites. – greg_1_anderson Jan 13 '12 at 0:09

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.