aktuelle Version holen (ermitteln auf der Website)
cd /tmp
wget https://releases.mattermost.com/5.16.2/mattermost-5.16.2-linux-amd64.tar.gz
tar -xf mattermost*.gz –transform=’s,^[^/]\+,\0-upgrade,‘
Mattermost anhalten
systemctl stop mattermost
alte Version sichern
cd /opt
cp -ra mattermost/ mattermost-back-$(date +’%F-%H-%M‘)/
Alle Verzeichnise löschen außer client, config, data, logs, plugins
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
mv mattermost/plugins/ mattermost/plugins~
mv mattermost/client/plugins/ mattermost/client/plugins~
Besitzer der neuen Dateien ändern
chown -hR mattermost:mattermost /tmp/mattermost-upgrade/
neue Version kopieren
cp -an /tmp/mattermost-upgrade/. mattermost/
rm -r /tmp/mattermost-upgrade/
Binding setzen
cd /opt/mattermost
setcap cap_net_bind_service=+ep ./bin/mattermost
Mattermost starten
systemctl start mattermost
System Console öffnen, einen Wert ändern und zurücksetzen.
Speichern
Seite neu laden.
Plugins wiederherstellen
cd /opt/mattermost
rsync -au plugins~/ plugins
rm -rf plugins~
rsync -au client/plugins~/ client/plugins
rm -rf client/plugins~