Upgrade multisite installation from 6.5 to 6.6

Matti303 - October 26, 2008 - 11:03

Two steps in the upgrade.txt are quite time consuming for a multisite setup:
* place each site off-line and on-line again after running update.php
* this is worse: disabling all contributed modules and then re-enabling them after running update.php (also includes keeping a list of enabled modules for each site)

Can this be done in a better way?

You don't need to disable

cog.rusty - October 26, 2008 - 12:01

You don't need to disable any modules for a minor update such as 6.5->6.6. Only for a major update.

Taking the sites offline is usually necessary (depending on your specific installed modules). One way is to write some shell scripts which add a $conf['site_offline']=1 to the end of all the settings.php files and then remove it, or set the 'site_offline' value directly in the 'variable' table of the databases. But still you need to run update.php on each site.

There have been some modules for Drupal 5 to automate some of these things, for example http://drupal.org/project/multisite_maintenance + http://drupal.org/project/multisite_api. I am not sure how easy it is to adapt them to Drupal 6, but be cautious with bulk operations because even when you are manually updating a single site some things can go bad under some circumstances (timeouts, out-of-memory errors etc).

Also check:
http://drupal.org/project/drush
http://groups.drupal.org/aegir-hosting-system

Thanks for the tip, as I'm

Matti303 - October 26, 2008 - 15:08

Thanks for the tip, as I'm more familiar with MySQL, I will look into set/unset the 'site_offline' value directly in the 'variable' table of the databases.

Putting sites offline using a script

dmdip - October 1, 2009 - 10:00

I am quite new to scripting and have tried it successfully to download and upgrade modules and themes. However, I am would appreciate some pointers on how I could do either of the two methods you suggest for putting multiple sites offline (and later online) simultaneously.

The two methods you had mentioned which I am referring to were :

(1) adding "$conf['site_offline']=1" to the end of all the settings.php files, and later removing that line. Adding should be easy with the "cat" command, but how do you remove that line later with a shell script?

(2) setting the 'site_offline' value directly in the 'variable' table of the databases - quite clueless here. How would one do this?

Also, why should it not be possible to run update.php for each of the multisites through a script? I suppose drush must be doing this somehow. I am a bit reluctant to use drush, so would prefer to do this through my own script.

 
 

Drupal is a registered trademark of Dries Buytaert.