How to upgrade an on-premise installation of the Mattermost server
Prerequisites
-
Install directory: Use the
whereis mattermost
command to find standard binary places and$PATH
. Usually, Mattermost is installed in/opt/mattermost
-
Storage used: The local storage directory contains all the files that users have attached to their messages. Paths are relative to the mattermost directory. So, if the local storage directory is
./data/
then the absolute path is/opt/mattermost/data
- Database disk space: A minimum 2GB of free disk space is required and a minimum of twice the size of your Mattermost installation available for the database.
Upgrade Mattermost Server
ssh to your Mattermost Server
ssh ubuntu@mattermost.testserver.com
Change directory to /tmp
cd /tmp
Delete all other files from /tmp
rm -rf
Download the latest version of Mattermost Server
For Enterprise Edition
wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
Eg.wget https://releases.mattermost.com/7.8.0/mattermost-7.8.0-linux-amd64.tar.gz
For Team Edition
wget https://releases.mattermost.com/X.X.X/mattermost-team-X.X.X-linux-amd64.tar.gz
Eg.wget https://releases.mattermost.com/7.8.0/mattermost-team-7.8.0-linux-amd64.tar.gz
Extract files
tar -xf mattermost*.gz --transform='s,^[^/]\+,\0-upgrade,'
Stop Mattermost server
sudo systemctl stop mattermost
Back up your data and application
Remove all files except data and custom directories from within the current mattermost directory
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
Copy new files to your install directory
sudo cp -an /tmp/mattermost-upgrade/. mattermost/
Change ownership
sudo chown -R mattermost:mattermost mattermost
Start Mattermost server
sudo systemctl start mattermost
Cleanup
sudo rm -r /tmp/mattermost-upgrade/
sudo rm -i /tmp/mattermost*.gz
After the server is upgraded, users might need to refresh their browsers to experience any new features.
Note: Some instances of Mattermost server might face issue after upgrade where the service does not start after upgrade. To resolve this, uncheck the Custom Emoji option from System Console and then perform the upgrade.
Ref: https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html
Top comments (0)