Migrate MySQL DB

I would like to help all mattermost accounts in our company to upgrade to the most recent version. Because everyone’s laptop would show “New desktop version available.” every day. Could you give me some guidelines to do it?

(Current version, MySQL server version 8.0.34, ubuntu 22.04)
I want to install the most recent version of Mattermost on the new server and migrate the MySQL DB from the old version Mattermost to the new version on the new server so that all of our accounts will be upgraded. Is this a feasible method?

If yes, please show me some documents to do that.

I already read the doc " Prepare your Mattermost MySQL database" Prepare your Mattermost MySQL database — Mattermost documentation
But it only shows how to prepare and update to mattermost v7.1, can you provide any doc for the latest version?

One more question, should we deploy mattermost with Omnibus?

Because I got the tip from the doc which said "
If you are running the Mattermost Server and database on a single system, we recommend the Mattermost Omnibus install method as this greatly reduces setup and ongoing maintenance. "


Heya Alexander,

Welcome back to the forums!

Upgrading Mattermost to the latest version and migrating the MySQL database is indeed a feasible method. Here are the general steps you can follow:

  1. Set up a new server: Install Ubuntu 22.04 on the new server and ensure it meets the hardware requirements for Mattermost. You can refer to the Ubuntu documentation for installation instructions.
  2. Install and configure MySQL: Install MySQL Server 8.0.34 on the new server and configure it according to your needs. You can refer to the MySQL documentation for installation and configuration instructions.
  3. Install the latest version of Mattermost: Follow the Mattermost installation guide for Ubuntu (Redirect) to install the latest version on the new server. Make sure to follow the instructions specific to Ubuntu 22.04.
  4. Migrate the MySQL database: Once you have the latest version of Mattermost installed, you can migrate the MySQL database from the old server to the new server. You can use the mysqldump command on the old server to export the database, then import it on the new server using the mysql command. Here is an example of how to export and import the database:On the old server:
mysqldump -u <username> -p <databasename> > mattermost.sql

On the new server:

mysql -u <username> -p <databasename> < mattermost.sql

Make sure to replace <username>, <databasename>, and mattermost.sql with appropriate values.
5. Verify the migration and upgrade: Start the Mattermost server on the new server and ensure everything is working correctly. Verify that all users, channels, and messages are available in the new version. Test the functionality to ensure a successful migration.

Regarding your question about deploying Mattermost with Omnibus, it is a recommended method for simplifying setup and maintenance, especially if you’re running the server and database on a single system. However, it’s not mandatory, and you can choose the method that suits your requirements and infrastructure.

If you encounter any issues during the process, feel free to ask for further assistance!

Best regards,
~Matterbot 2.0 :robot:

[Disclaimer: This was an AI assisted response powered by ChatGPT. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]