Summary
migration-assist pgloader
fails on migration from MySQL to PostgreSQL as part of an upgrade from 9.0.0 to 10.4.2.
Steps to reproduce
I’ve followed the instructions at Automated PostgreSQL migration - Mattermost documentation.
- Check the MySQL database schema - success:
- Create the PostgreSQL database schema - success
- Generate a pgloader configuration - success
- Run pgloader - success
- Restore full-text indexes - success
- Complete plugin migrations - success
- Configure Mattermost to utilize the new PostgreSQL database - success
Observed behavior
- Check the MySQL database schema - success:
sudo -u <<mmuser>> migration-assist mysql 'migration:<<password>>@(<<OLDSERVERIP>>:3306)/<<mmdb>>' postgres 'postgres://<<mmuser>>:<<password>>@localhost:5432/mattermost?sslmode=disable' 2025-02-18 16:16:39 pinging MySQL... 2025-02-18 16:16:39 connected to mysql successfully... 2025-02-18 16:16:39 running checks for artifacts... 2025-02-18 16:16:39 4 checks been made, all good for artifacts 2025-02-18 16:16:39 running checks for unicode... 2025-02-18 16:16:58 11 checks been made, all good for unicode 2025-02-18 16:16:58 running checks for varchar... 2025-02-18 16:16:58 8 checks been made, all good for varchar 2025-02-18 16:16:58 running checks for varchar-extended... 2025-02-18 16:16:59 12 checks been made, all good for varchar-extended
- Create the PostgreSQL database schema - success
migration-assist postgres 'postgres://<<mmuser>>:<<password>>@localhost:5432/mattermost' --run-migrations --mattermost-version="9.0.0" 2025-02-18 16:18:47 pinging postgres... 2025-02-18 16:18:47 connected to postgres successfully. 2025-02-18 16:18:47 schema owner check passed. 2025-02-18 16:18:47 checking if tables are empty... 2025-02-18 16:18:47 cloning repository@9.0.0 2025-02-18 16:18:48 git version: git version 2.43.0 2025-02-18 16:18:49 checking out... 2025-02-18 16:18:51 removing existing migrations... 2025-02-18 16:18:51 moving migration files into a better place.. 2025-02-18 16:18:51 running migrations.. 2025-02-18 16:18:51 migrations applied.
- Generate a pgloader configuration - failed
sudo -u <<mmuser>> migration-assist pgloader --mysql='migration:<<password>>@(OLDSERVERIP:3306)/<<mmdb>>' --postgres='postgres://<<mmuser>>:<<password>>@localhost:5432/mattermost' > migration.load An Error Occurred: could not generate config: could not parse mysql DSN: no match found
The MySQL DSN for Step 3
is a copy/paste from Step 1
with no special characters (anymore)… I had to change the password to have no special characters for Step 1
to work.