Upgrade Mattermost Team Edition
It is strongly recommended to create a backup before starting the update process. If you have important data, create and restore a backup to ensure that everything works properly.
NOTE: If the stack was installed as the root user, prefix the commands below with sudo if not already present.
Follow these steps to upgrade Mattermost:
Stop the server:
$ sudo installdir/ctlscript.sh stop mattermost
Back up the current configuration files:
$ mkdir installdir/apps/mattermost/backup/ $ cp installdir/apps/mattermost/server/config/config.json installdir/apps/mattermost/backup/
Back up the database as described on the MySQL page.
Back up the Mattermost data files:
$ cp -r installdir/apps/mattermost/server/ installdir/apps/mattermost/backup/server
Download the latest version of Mattermost:
$ cd installdir/apps/mattermost/ $ wget https://releases.mattermost.com/X.X.X/mattermost-team-X.X.X-linux-amd64.tar.gz
Remove previous Mattermost files (already backed up in previous steps).
$ rm -rf installdir/apps/mattermost/server/*
Uncompress the new version:
$ tar xzf mattermost-team-X.X.X-linux-amd64.tar.gz -C installdir/apps/mattermost/server --strip-components=1
Restore the previous configuration file:
$ cp installdir/apps/mattermost/backup/config.json installdir/apps/mattermost/server/config/config.json
Adjust file permissions as below.
If the stack was installed as the root user:
$ chown -R root:root installdir/apps/mattermost/server $ touch installdir/apps/mattermost/server/logs/mattermost.log $ chown -R bitnami:mattermost installdir/apps/mattermost/server/logs $ chmod g+w installdir/apps/mattermost/server/logs/mattermost.log
If the stack was installed as a non-root user:
$ chown -R bitnami:bitnami installdir/apps/mattermost/server $ touch installdir/apps/mattermost/server/logs/mattermost.log $ chown -R bitnami:mattermost installdir/apps/mattermost/server/logs $ chmod g+w installdir/apps/mattermost/server/logs/mattermost.log
Restart the server:
$ sudo installdir/ctlscript.sh restart mattermost
Open the “System Console” and save a change. Doing this will upgrade your config.json schema to the latest version using default values for any new settings added.