3/3 Using Aegir to manage a large amount of sites

02
Jun
2014

This is part 3 of Aegir mini-series.

After all your fancy new sites are up and running, you need to maintain them. Aegir itself is a well-built tool to do that of course, but still there are some nifty hints to make one admin happy.

Updating and upgrading code

Aegir offers a very nice feature for updating and upgrading your code. If you are updating, it’s a no-brainer: - just update the code on the server and you are good to go. But when you upgrade, simply create a new platform, give it some nice version number and migrate all your existing sites to this new platform. Aegir will automatically create a database snapshot before the migration takes place so you can revert anytime you discover a problem.

Some helpful notes:

  • update.php is automatically run
  • it’s possible to run migrations in bulk, or even migrate the whole existing platform to another one

Running stuff on existing sites

Have you ever had to turn on a module on a site? Or run updates.php? Or clear all cache? If not, then you are a Drupal baby I guess. Anyway, I think everyone has realised where this is going by now. Clearing cache on 150 sites is not a trivial task. Aegir has no support for the above mentioned procedures so we have to deal with it somehow. It’s really simple. Just run drush script for all your sites and it’s done.

Like this:

for site in *.mydomain.com; do drush cc all --uri=$site -y; done

drush @sites cc all -y

I really like the power and simplicity of this one-liner, feel free to be a genius and use it instead of insane clicking.

 

If this tutorial helped you at least a little, I am glad! 
In case of any questions, submit your comments below. Thanks!
 
 

About the author

m1n0's picture

Milan is a web developer with more than 5 years of experience in web development and Drupal. Milan is a technology enthusiast and he loves to play with new gadgets and development techniques. He is also a musician and he loves to play drums with his band.

LIKED THE POST? SPREAD THE WORD!

del.icio.usStumbleUponDiggFacebookLinkedIn

6 comments so far

pebosi's picture

Shorter with alias
<code>drush @sites cc all -y</code>

m1n0's picture

Thanks, I didn't notice that alias before! I will update the blog.

Tushar's picture

Hi Milan,
Thanks for the nice tutorial. Its really works.

ayakkabi's picture

I really enjoyed

sandvic panel's picture

I will update the blog.

Add new comment