Posted by geofftech on September 22, 2011 at 11:03am
Suppose you have just updated some modules in your Aegir/Barracuda installation (in this case 'colorbox') that require a database update....
What is the correct way to run the drush 'updatedb' for each site on a platform?
I have tried 'verify' but that doe snot run the database update. I am sure there must be some easy way of doing it - and queuing it like other BOA tasks?

Comments
Please
Please see:
http://groups.drupal.org/node/175444#comment-584349
http://drupal.org/node/1283316#comment-5005678
Thankyou ... but both these
Thankyou ... but both these threads seem to contradict each other.
http://groups.drupal.org/node/175444#comment-584349 :: says that you can simply run "drush dbup".
http://drupal.org/node/1283316#comment-5005678 :: says do NOT do this. Create a NEW platform for each update so you can keep backups. And that you should never run "drush dbup" on a production site.
I guess the "best practice" would be to create an identical platform for every code change and "migrate" every site to that new platform. That is a massive change for a small change in a single module. But I guess this is versus the risk of the update failing and everything falling over.
I know it is the wrong thing to do now - but as a quick solution to running the update for each site one at a time I ran this script;
for d in *do
if [ ! -d $d ]
then
echo "$d if not a folder"
elif [ $d == "all" ]; then
echo "not the 'all' folder"
else
echo "do $d">
cd $d
drush updatedb -y>
cd ..
fi
done
Best practice aside, I just can't see myself creating a new platform for a small module change. It would be nice to have another Aegir option (alongside migrate) which is "Run Database Update". Maybe it could run a database backup first!!
http://geoff.com.au - http://redronin.com
Basically, it is a simple
Basically, it is a simple choice between predictable amount of work (not really big) associated with following best practices and unknown amount of work (and downtime) associated with disaster recovery.
I could recommend my two articles explaining the bigger picture:
http://omega8.cc/managing-your-code-in-the-aegir-style-110
http://omega8.cc/the-best-recipes-for-disaster-139
You can run
drush mupordrush dbupon the cloned copy of your site, migrated to the new platform (to upgrade the new platform's code if you don't use makefiles), and Aegir will rundrush dbupfor you automatically when you are migrating any site to the newer platform with already updated code (so with expected db updates), so there is no need for any separate and insecure task.Note also, that the built-in Aegir backup/restore tasks will not help you when you are updating any code in the profiles/profilename or sites/all space, because the backup includes only sites/domain directory and database dump.
Ah...that's not fair. You
Ah...that's not fair. You have used logic and reason in your argument.
A small known cost to guarantee success or a gamble that could lead to a massive error and time cost if you get it wrong.
So a new platform for every code change and module update is the way to go. I guess this is as easy as copying the existing platform (less the sites). Running the updates on it. Add and Verify that new platform. And migrate the sites over.
or use these makefile thingies...
http://geoff.com.au - http://redronin.com
geofftech - i think you
geofftech - i think you should spend an hour playing around with "those makefile thingies". They're safer than running dbupdate as you can control versions and patches for all the modules in your platform really easily.
when you go through the README.txt file for drush make, if you're trying to fast-track your organization pay special attention to the "includes" and "generate" sections :)