Migrating config.json to DB

Hi there @ahmaddanial, thanks for your help. Here you go:

  1. Mattermost Version: 5.36.0

  2. Database Schema Version: 5.36.0

  3. postgres v10

  4. from GUI, SELECT * FROM Configurations returns the 2 aforementioned records (of course the value column is a big json, not shown in the screenshot):

  5. cat /opt/mattermost/config/mattermost.environment:

MM_CONFIG='postgres://mmuser:redacted@127.0.0.1:5432/mattermost?sslmode=disable&connect_timeout=10'
  1. cat /lib/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
Requires=postgresql.service

[Service]
Type=notify
EnvironmentFile=/opt/mattermost/config/mattermost.environment
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=postgresql.service
  1. Result of bin/mattermost config get SqlSettings.DataSource run as mattermost user:
    SqlSettings.DataSource: "postgres://mmuser:redacted@127.0.0.1:5432/mattermost?sslmode=disable&connect_timeout=10"

  2. I did indeed run the bin/mattermost config migrate command as mattermost user.

Thank you so much!