Mattermost backup and restore

Keep the message database, server configuration and user-uploaded file store synchronized.

Last updated

On this page (5)

Mattermost · Backup and restore

Before you start

  • Matching server release and compatible PostgreSQL tools.
  • Maintenance window to stop all application writers.
  • An isolated target and a separate test bucket if using S3.

Procedure

  1. Stop application writers for a consistent cut. Run pg_dump -Fc -f mattermost.dump mattermost using the configured connection.
  2. Copy config/config.json, referenced SAML certificates and local files from ./data or the configured Directory; record environment overrides. For S3, protect the bucket with its own backup or version policy and record the recovery point.
  3. Run pg_restore --exit-on-error -d mattermost_test mattermost.dump against an empty target with suitable roles, restore configuration and files, then change only environment-specific settings to point to test dependencies before startup.

Verify the result

  • Log in and sample a private channel’s history and a known uploaded file.
  • Confirm restored configuration points only at test database, object storage and integration endpoints.

Official documentation

Have Pilae operate Mattermost

We agree what to monitor, how to recover and who responds when something breaks. Bring your existing deployment or start with a new one.