Upgrade Version

Hello,

I have a question. I have a server running Mattermos 10.4.2 and PostgreSQL 11. I’m migrating to a new server running PostgreSQL 15, but my question is: to update and upgrade to the latest version 11, how should I proceed? Do I need to download the latest version, or should I upgrade step by step from one version to the next?

Best regards

The recommended way is:

  • Update your current version to the latest patch version (in your case: v10.4.x, where “x” is the latest patch version)
  • Upgrade to the next extended support release (ESR) (v10.5.x, where “x” is the latest patch version)

From there on, jump from ESR to ESR without missing one.
ESR+1 is possible, ESR+2 not.

You’ll find all extended support releases in the changelog or the release lifecycle explanation in the docs.

The safest approach here is to separate your two migrations rather than doing them at the same time. Upgrading Mattermost AND migrating to a new Postgres version simultaneously doubles the blast radius if something goes wrong, and the troubleshooting becomes a nightmare.

Recommended order:

  1. First: Get Mattermost to current ESR on your existing server + existing Postgres 11

    • Go through ESR releases incrementally (don’t skip major versions): your current → 7.8 ESR → 8.1 ESR → 9.11 ESR (current LTS)
    • Test each hop, verify the data migration scripts ran cleanly
    • Mattermost has a well-documented upgrade guide with step-by-step per version
  2. Then: Migrate the database to Postgres 15 on your new server

    • pg_dump from Postgres 11 → pg_restore to Postgres 15 (direct cross-version dumps work fine)
    • Postgres 15 has some syntax changes but nothing that breaks a Mattermost schema
    • After restore, run ANALYZE; and REINDEX DATABASE mattermost; to rebuild stats
  3. Finally: Cut over Mattermost to the new server + Postgres 15

    • Maintenance window, update config.json with new DB connection string, restart

Why not simultaneously? If you hit a Mattermost upgrade error, you won’t know if it’s the app version, the Postgres version, or a data issue. Keeping them separate gives you clean rollback points at each step.

What version of Mattermost are you currently on? That determines how many hops you need for the incremental upgrade path.