# Error Creating migration.load During PostgreSQL Migration

**URL:** <https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079>\
**Category:** Troubleshooting\
**Created:** [April 24, 2025, 7:50am UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079 "2025-04-24T07:50:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MM\_User\_2025](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@MM\_User\_2025](https://forum.mattermost.com/u/MM_User_2025)\
**Post date:** [April 24, 2025, 7:50am UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/1 "2025-04-24T07:50:27Z")

</div>

Hello.

In step 3 (Generate a pgloader configuration) I get an error after running the command:

```auto
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

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [April 29, 2025, 8:12pm UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/2 "2025-04-29T20:12:18Z")

</div>

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](https://docs.mattermost.com/deploy/postgres-migration.html).

---

<div class="post-metadata">

**Author:** ![MM\_User\_2025](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@MM\_User\_2025](https://forum.mattermost.com/u/MM_User_2025)\
**Post date:** [April 29, 2025, 10:09pm UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/3 "2025-04-29T22:09:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MM\_User\_2025](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@MM\_User\_2025](https://forum.mattermost.com/u/MM_User_2025)\
**Post date:** [May 2, 2025, 7:55am UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/4 "2025-05-02T07:55:27Z")

</div>

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:

```auto
{
  "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:

```auto
{
  "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.

---

<div class="post-metadata">

**Author:** ![MM\_User\_2025](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@MM\_User\_2025](https://forum.mattermost.com/u/MM_User_2025)\
**Post date:** [May 3, 2025, 3:38am UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/5 "2025-05-03T03:38:36Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [May 6, 2025, 10:15pm UTC](https://forum.mattermost.com/t/error-creating-migration-load-during-postgresql-migration/23079/6 "2025-05-06T22:15:48Z")

</div>

Thank you for updating us on your progress, @MM_User_2025! Fingers crossed for you. 🤞🏻
