Alternative "no down time" workflow for upgrading Drupal or modules

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Charles Belov's picture

I manage a public transportation website that is accessed 24 hours a day. Also, as a government agency, we are trying to minimize overtime, so late-hour maintenance is problematic. It is not feasible for me to take the website down in order to make upgrades. I would like to vet the proposed upgrade workflow with the Drupal community:

  1. Rather than taking the site off-line, take only updates off-line. Only the administrator doing the update could sign on.

  2. Back up the database.

  3. Install the upgraded Drupal to a new directory.
  4. Copy customizations from the production directory to the new directory.
  5. Copy the database to an new database.
  6. Point the new directory at the new database.
  7. Run upgrade.php
  8. Test and resolve any issues.
  9. If necessary, rename the databases so the MySQL grants will be correct, and verify that the production website can still access it.
  10. Change the webserver's alias for the Drupal directory to point to the new directory, which will now become the production directory, and restart the webserver.
  11. Change the permissions on what used to be the production directory to be available only to the maintainer, in case any other issues pop up.
  12. Done.

Besides not having to take the website down, if I run into any issues during the upgrade process I am not panicking to deal with a website that is not available to the public. Also, if there were an emergency post that had to go up that minute - it's possible as we have time-sensitive legal posting requirements - I could re-enable updating and then re-do any necessary steps of re-backing up and re-copying the database and re-running update.php.

Is this realistic?

Is there a quick way to take only updates off-line? It's not available as an option on the Maintenence page.

Comments

Just discovered one glitch

Charles Belov's picture

I never created a home page before doing the upgrade. Now all the links on the default home page point back to the corresponding pages in the pre-upgrade directory instead of being relative. So I had to go into httpd.conf and do a redirect (because I need to redirect http and https separately, which in Apache appears to require access to the VirtualHost directive).

It's not a true solution as it's not clean and might not be detected as a visited link.

Charles Belov
Webmaster
San Francisco Municipal Transportation Agency (SFMTA)

Upgrade

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: