Download & Extend

Site maintenance mode

Project:Drush
Version:All-versions-3.0
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

In normal Drupal practice it is necessary to put the site into maintenance mode before upgrading anything, even a module, if I have understood correctly. Is this still true with Drush? and is there a Drush command to do this?

Comments

#1

Status:active» fixed

drush does not do that, nor do the maintainers think thats needed. if you want to do it yourself, run drush vset site_offline 1

#2

Status:fixed» active

Thanks for this important clarification. This seems to puzzle people - I have amended the documentation at http://drupal.org/node/477684. Could you please consider adding it to the readme.txt and other places where Drush is documented?

#3

What if we added a lot of examples to drush help variable-set? I could whip up a quick list later...

#4

+1 for examples a.k.a. time savers. :)

#5

xref #804754: HTML documentation through drush where the drush documentation help page is generated through drush.

The same way we could generate the examples.

#6

Status:active» fixed

I think the existing examples are sufficient. site_offline is there.

#7

I agree; I did go trolling through the variables table, and didn't really see anything useful and generic enough to add...

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

Here is a one-liner that puts all sites of a multisite environment into sites maintenance mode:

for s in $(drush -n @sites st | sed -e '/#/!d' -e 's/^[^#]*#//'); do echo -n "$s: "; drush -y -l http://$s vset site_offline "1"; done

Putting them all back online works with that code:

for s in $(drush -n @sites st | sed -e '/#/!d' -e 's/^[^#]*#//'); do echo -n "$s: "; drush -y -l http://$s vset site_offline "0"; done

Working great for me :-)