Introduction
Periodic maintenance is required In order to keep the site running smoothly. Here's a (probably partial) list of tasks that I recommend performing weekly.
OS Updates
The Ubuntu Linux operating system is frequently updated with security and bug fixes. To update the OS, log in as webmaster and execute the following commands:
sudo bash -c 'apt-get update; apt-get upgrade; apt-get dist-upgrade; apt-get autoremove; echo; cat /var/run/reboot-required 2>/dev/null'
About once every two years, Ubuntu issues a new Long Term Support (LTS) release; as of this writing, the newest LTS release was in April 2016, hence numbered 16.04. Each LTS release is supported for five years, so there's no pressing reason to upgrade immediately. In fact, it's better to wait at least 6-12 months to ensure that any kinks have been worked out.
IMPORTANT: Rackspace does not guarantee that the standard do-release-upgrade command will work on their virtual servers. If you decide to try that route, be sure to make a full system image backup using the mycloud.rackspace.com console first. Otherwise you will have no way to get back to an operational state if the upgrade fails!
The alternative is to create an all-new virtual server, install MySQL, Drupal, and all the other required support packages, and then copy the web site files and database from the old server.
Drupal Updates
Modules
Module updates are fairly frequent, and the system emails the webmaster whenever a new module version comes out. Check the release notes for the package(s) in question to see if there are any security-related fixes. If so, install them immediately.
Updating is a simple two-step process: run a manual database backup, then visit the module update page and follow the instructions there. (The instructions screen tells you to do a backup, but that requires leaving the update screens, performing the backup, and finding your way back to the update screens. That's why I prefer to run the backup first.)
Core
Drupal's core functionality is typically updated a few times a year. Unlike the point-and-click procedure for modules, updating core requires shell access:
- Run a manual database backup
- ssh www.iac.org -l webmaster
- cd $D7/sites/www.iac.org
- sudo -u www-data drush up -y
Verify Backups
I've configured two types of backups: database-only (via Drupal's Backup and Migrate module) and whole-server (via Rackspace's management console).
If you have to fix a problem that's limited to Drupal (deleted something you shouldn't have, EAA sends bad member data, etc.) you can do that via the Drupal admin pages. Note: Most content types are configured to keep revision history, so simple editing errors can be fixed by reverting to a previous revision.
From time to time, check the Rackspace backups as follows:
- Log in to the management console
- Select Hosting from the left-hand navigation bar
- Select Cloud Servers from the left-hand nav bar
- In the main window area, click on Web-Production
- Click on the Images tab
- You should see one daily backup, and one weekly backup
If you muck something up at the OS level, you can probably recover by restoring from the most recent daily backup. If the mistake occurred more than a day ago, use the weekly backup. Note that these backups cover the everything on the server, including the database. So if you do restore a whole system backup, any Drupal content changes since the time of the backup will be lost.