# What is updating versus upgrading?

Updating is moving from Drupal 8.xxx to a later version of Drupal 8.xxx.

If you are upgrading (ex. to Drupal 9.xxx), then STOP and follow the Drupal documentation.

# Design

We generally want to follow [the official Update procedure in Drupal 8](https://www.drupal.org/docs/8/update/update-procedure-in-drupal-8)

However, we want to spin up new Drupal machines (with possibly later versions of Drupal 8) alongside existing Drupal machines. When the new machines are ready, then we can spin down the old Drupal machines.

So ...

1. On **old** machines:
  ```
  alias drush="runuser -u drupaladmin ~drupaladmin/bin/drush"
  drush sset system.maintenance_mode 1
  drush cache-rebuild
  ```
2. Deploy **new** machines, using same *shared* filesystem and same *shared* database. But do not send any traffic to the new machines yet (ex. if you have load balancers, do not attach the new machines to the load balancer).
3. On **new** machines:
  ```
  alias drush="runuser -u drupaladmin ~drupaladmin/bin/drush"
  drush updatedb
  drush entity-updates
  
  drush core-requirements
  ```
4. If you have **any** `Error` in your `drush core-requirements`, look at the report or go to https://localhost/admin/reports/status to see what the problem is. Do not proceed until it is fixed.
5. Send traffic to the **new** machines.
6. On **new** machines:
  ```
  alias drush="runuser -u drupaladmin ~drupaladmin/bin/drush"
  drush sset system.maintenance_mode 0
  drush cache-rebuild
  ```
7. Remove traffic from **old** machines.

Document how we will flip to new updates of Drupal
Document how we will flip to new updates of Drupal
