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:
-
Rather than taking the site off-line, take only updates off-line. Only the administrator doing the update could sign on.
-
Back up the database.
- Install the upgraded Drupal to a new directory.
- Copy customizations from the production directory to the new directory.
- Copy the database to an new database.
- Point the new directory at the new database.
- Run upgrade.php
- Test and resolve any issues.
- If necessary, rename the databases so the MySQL grants will be correct, and verify that the production website can still access it.
- 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.
- 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.
- 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
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)