Hello.
In step 3 (Generate a pgloader configuration) I get an error after running the command:
migration-assist pgloader --mysql="mmuser:Password1@tcp(localhost:3306)/mattermost" --postgres="postgres://mmuser:Password1@localhost:5432/mattermost" > migration.load
migration-assist: command not found
Ubuntu v22.04.5
Mattermost v10.4.2
mysql Ver 15.1 Distrib 10.6.21-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
PostgreSQL 14.17 (Ubuntu 14.17-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit
pgloader version “3.6.3~devel”
I can provide additional information if needed.
Any suggestions are appreciated
Welcome to the Mattermost community, @MM_User_2025!
I could be wrong, but it looks like the error migration-assist: command not found
typically means the migration-assist
tool isn’t installed yet. You can find more info in our MySQL to PostgreSQL guide.
Hello. Thanks for the reply.
I had been following the automated migration instructions based on the page you linked.
I opted to download/install both the migration-assist tool and pgloader on our production Mattermost server as we are a small team and the impact would be minimal.
I was able to get steps 1 and 2 to complete successfully after dealing with a password issue. (It seems the migration tool does not like complex passwords on either MySQL or PostgreSQL)
I’ve reverted my checkpoint for now so I will need to revisit this again when I have time.
I will report back when I have attempted the migration again. Perhaps I missed something in the outlined steps.
Thanks again.
1 Like
Okay after some research I decided to migrate from MariaDB to MySQL server before attempting the PostgreSQL migration again.
I first updated Mattermost to v10.7.1
I then migrated the database to MySQL version 8.0.41-0ubuntu0.22.04.1
Everything seems to be working but I have these errors in my Mattermost system log:
{
"caller": "app/plugin_api.go:1110",
"error": "Error 1146: Table 'mattermost.IR_Metric' doesn't exist\nfailed to get metricsData\ngithub.com/mattermost/mattermost-plugin-playbooks/server/sqlstore.(*playbookRunStore).......
"level": "error",
"msg": "An internal error has occurred. Check app server logs for details.",
"plugin_caller": "github.com/mattermost/mattermost-plugin-playbooks/server/api/api.go:85",
"plugin_id": "playbooks",
"request_id": "gzmige687fdnjg9ndj5m9jj5ea",
"timestamp": "2025-05-02 07:25:24.239 Z"
}
There was more in the error but it looked irrelevant so I shortened it.
I’m assuming the table “IR_Metric” didn’t exist in the MariaDB database and I need to create it?
Here is the second error:
{
"caller": "api4/config.go:455",
"ip_addr": "10.165.5.2",
"level": "warn",
"method": "PUT",
"msg": "Unrecognized config permissions tag value.",
"path": "/api/v4/config/patch",
"request_id": "y53xkwxit3yfmnjfouudwpzcrc",
"tag_value": "sysconsole_write_*_read",
"timestamp": "2025-05-02 07:45:31.336 Z",
"user_id": "ki15n88ertdedc8aj4zxojtg8h"
}
I’d like to correct these before proceeding.
I was able to restore the IR_Metric table by booting up a copy of my Mattermost server with an empty database. It created all of the default tables when starting the Mattermost service and I used the following commands to export the missing tables and then import them to my production server’s database:
Table Export:
mysqldump mattermost IR_Metric > irmetric.sql
mysqldump mattermost IR_MetricConfig > irmetricconfig.sql
Table Import:
mysql mattermost < irmetric.sql
mysql mattermost < irmetricconfig.sql
I’m still monitoring the log for any other errors.
I will update the thread again when I attempt the PostgreSQL migration.
1 Like
Thank you for updating us on your progress, @MM_User_2025! Fingers crossed for you. 