Mattermost Upgrade Plan: v9.7.3 → v10.x – Need Advice & Clarification

Hi everyone

I’m planning to upgrade Mattermost.
The current Mattermost version is 9.7.3, and I’m aiming to upgrade to the latest version in the 10.x series.

Below are the server specifications.

  • OS: Ubuntu 22.04
  • PostgreSQL: 14.17
  • Nginx: 1.18.0

According to my research, it’s recommended to upgrade from one ESR version to the next ESR version.
So the upgrade path would be:
v9.7.3 → v9.11.16 (ESR) → v10.5.6 (ESR) → latest version

Do you have any advice or suggestions regarding this plan?

Also, I have a couple of questions:

  1. I heard that database migration happens automatically during the upgrade. Could you explain how that process works?
  2. What happens to the custom settings in the config.json file during the upgrade?

You are correct about the procedure. Always take backups / snapshots!

Any schema migrations get copied in to db/migrations and when Mattermost starts and sees a new one, it runs that first.

Depending on how you’re deployed, the upgrade process has you leave the config directory alone. Like in Upgrade Mattermost Server - Mattermost documentation we’re told to

sudo find mattermost/ mattermost/client/ -mindepth 1 -maxdepth 1 \! \( -type d \( -path mattermost/client -o -path mattermost/client/plugins -o -path mattermost/config -o -path mattermost/logs -o -path mattermost/plugins -o -path mattermost/data \) -prune \) | sort | sudo xargs rm -r

which removes the application directories but leaves config, logs, data, and plugins in place (after copying the whole thing, just in case!)