docs icon indicating copy to clipboard operation
docs copied to clipboard

Add Migrating Mattermost server from MySQL to PostgreSQL

Open biva opened this issue 3 years ago • 14 comments
trafficstars

Add a section to help people migrate from MariaDB to PostgreSQL, following https://github.com/mattermost/mattermost-server/issues/18351

biva avatar Jun 16 '22 09:06 biva

Hello @biva,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement? Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

mattermod avatar Jun 16 '22 09:06 mattermod

Hello, I'm still working on the file, I'll keep you updated when I'll be ready. Sorry if it's not the right process, I thought doing a draft pull request would leave me time to work on it without bothering you :/

biva avatar Jun 16 '22 09:06 biva

/check-cla

biva avatar Jun 16 '22 10:06 biva

There are a lot of stuff that I'm not sure of, but notably:

  1. Formatting: I might have not respected all conventions, I'm not sure
  2. Step 3: Migrate to the latest version: I understood that servers with MariaDB might have issues with the latest versions of Mattermost (for example version 7). Is it a risk? Should we keep this step?

biva avatar Jun 16 '22 11:06 biva

Thank you, @biva, for this thoughtful docs PR to assist users looking to migrate from MariaDB to PostgreSQL.

Mattermost doesn't officially support MariaDB as a Mattermost database, and doesn't support migration path from MariaDB to MySQL. You can find and contribute to unsupported functionality, systems, migrations, and community-maintained content via the Mattermost Discussion Forum.

While we can't incorporate this great PR into the Mattermost product documentation, I strongly encourage you to post this on the forum so that others can benefit.

cwarnermm avatar Jun 22 '22 20:06 cwarnermm

MariaDB being largely compatible with MySQL, these instructions should be fairly easily modified to provide a guide for migrating from MySQL to PostgreSQL. If PostgreSQL is indeed preferred over MySQL for Mattermost, it seems like that would be a useful guide to have.

elyscape avatar Jun 22 '22 21:06 elyscape

Hello @cwarnermm , thanks for your message. I understand that it's not possible for Mattermost to include MariaDB in the documentation because it was never officially supported. That definitely makes sense. I renamed it "Migration from MySQL to PostrgreSQL" and replaced MariaDB by MySQL everywhere: I think that like this, it helps people in real situations which are officially supported by Mattermost (not only the ones moving from MariaDB, but also the ones wanting to migrate from MySQL).

In addition, I think it would correspond to the message from @agnivade in https://github.com/mattermost/mattermost-server/issues/18351#issuecomment-1153228930:

We can definitely look into providing clear guidelines for how to migrate from MySQL to Postgres.

Would that make sense for you?

And for full clarity: I didn't test it yet: I only have 1 server in production, so I would like to have more feedback and advice and corrections before testing it.

biva avatar Jun 23 '22 11:06 biva

Thank you, @biva, for your understanding and flexibility! (And thank you @elyscape for the idea to shift the focus from MariaDB to MySQL!)

As @agnivade noted, once these steps are tested and confirmed working, this is good content to add to the product documentation that will benefit others.

@biva - Don't worry too much about the formatting or RST syntax required. That's something I can help with as we finalize your PR.

cwarnermm avatar Jun 23 '22 13:06 cwarnermm

Thanks, would somebody of your team be able to review the process first, before we test it?

biva avatar Jun 23 '22 13:06 biva

@biva - You are most welcome to test out the steps in a dummy environment. There's no need to test out in an actual production environment.

agnivade avatar Jun 23 '22 14:06 agnivade

As mentioned, I have no test environment and I would appreciate your review before testing: would that be possible?

biva avatar Jun 23 '22 14:06 biva

Understood. Unfortunately, it's not on our priority list as of the moment. But I'd appreciate the community's help on this. I will create an open GitHub issue regarding this.

agnivade avatar Jun 23 '22 14:06 agnivade

Oh my bad, I was thinking about another issue. I didn't realize that we already had https://github.com/mattermost/mattermost-server/issues/18351 created.

agnivade avatar Jun 24 '22 04:06 agnivade

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

mattermod avatar Jul 08 '22 01:07 mattermod

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

mattermod avatar Nov 06 '22 01:11 mattermod

@agnivade - Do we want to keep this docs PR open? I'm not sure if this PR continues to offer value if published.

cwarnermm avatar Jan 31 '23 14:01 cwarnermm

We can close this if we are unable to test the steps.

agnivade avatar Jan 31 '23 14:01 agnivade