Upgrade procedure self hosted

Dear Mattermost community.

I’m want to upgrade mattermost from version 6.5.0 to 7.7 (self hosted on UBUNTU Server). I have a question regarding

Importan upgrade notes

There are several MySQL commands (since I’m using mySQL as database engine) or other config.json changes. Must I execute all this commands before the upgrade on the server, or is it done automatically during the upgrade by mattermost itself?

I will be appreciated for any hel regarding this topic.
Best regards
Jakub

Hi Jakub and welcome to the Mattermost forums!

You do not need to execute the queries before running the upgrade, Mattermost will do that on its own. With MySQL, unfortunately, some of the necessary schema migrations take quite some time and while they are running, Mattermost is not usable and therefore these queries are provided to be run manually before the upgrade steps in order to keep the downtime as short as possible.
If you can afford a few minutes of downtime, you do not have to manually prepare your setup and just follow the upgrade guides.
You also do not need to change anything in your config.json file, just make sure that after the upgrade, you login to your system console, change one setting and change it back and then click on save in order for the application to write a new config.json file adding potentially missing configuration options.

Thank you for you answer. I think all my doubts has been cleared now.

Best regards
Jakub

You’re welcome! If you stumble upon any issues, let me know - here to help!

Hello,

The system is upgraded. I had problem with executing one command from this manual:
https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html

administrator@mattermost:/opt$ 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 -o -path  mattermost/yourFolderHere \) -prune \) | sort | sudo xargs rm
rm: missing operand

Can it be a problem?
Best regards
Jakub

Hey,

this is OK, IMHO the docs are not clear about that in some point. They will show you the command to run first in step 7 and will then detail the process again inside this step and when you followed all the commands, you’ve already deleted the folders directly at the beginning of step 7 and will then probably get the error when running the command directly above the Using Bleve search heading:

Thank you. At the moment everything is running and nobody complains.

I think the topic can be closed.