mattermost / mattermost/docker

Documentation on Mattermost migration

Open
#42 13 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
533
Forks
284
PR merge metrics
No merged PRs in 30d

Description

The documents use the simple export SQL and import SQL process. Also, provide the ways to migrate the files, plugins and configuration from the original mattermost/mattermost-docker repository to the mattermost/docker repository

Prepared

  1. App built via mattermost/mattermost-docker
  2. New App built via mattermost/docker

Steps

  1. Backup and dump the sql from the original mattermost/mattermost-docker Postgres service.
  2. Enable the new Postgres service from the mattermost/docker.
  3. Import the dumped SQL file into the Postgres service of mattermost/docker.
  4. Copy the matched volumes folder from the original mattermost/mattermost-docker to the mattermost/docker volumes folder.
  5. Restart the app from the mattermost/dockerversion
  6. Check the config.json and the settings.
Backup and dump the sql from the original mattermost/mattermost-docker version
  1. Enable the Postgres service from the original mattermost/mattermost-docker
docker-compose up -d db
  1. Dump from the original Postgres service.
docker exec -it mattermost-docker_db_1 pg_dump mattermost -U mmuser --no-privileges > dump.sql

Enable the new Postgres service from the mattermost/docker

  1. Enable the Postgres service from mattermost/docker.
docker-compose up -d postgres
  1. Remove the database and create a new one
docker exec -it postgres_mattermost dropdb mattermost -U mmuser
docker exec -it postgres_mattermost createdb mattermost -U mmuser

Import the dumped SQL file into the Postgres service of mattermost/docker

  1. Copy the dump.sql into the current mattermost/docker folder
  2. Import the dump SQL into the new database
docker exec -i postgres_mattermost psql -U mmuser -d mattermost < dump.sql

Copy the matched volumes folder from the original mattermost/mattermost-docker to the mattermost/docker volumes folder

  1. COPY mattermost-docker/volumes/app/mattermost/ TO docker/volumes/app/mattermost
  2. Change the client-plugins folder to clients/plugins
mv client-plugins clients/plugins
  1. Change the permission and owner
sudo chown -R 2000:2000 volumes

Restart the app from the mattermost/dockerversion

restart the app using the following command in mattermost/docker folder

sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up -d

Check the config.json and the admin settings.

Because of the SiteURL configuration and ListenAddress configuration in mattermost/docker are different from the original mattermost-docker version.

Therefore, please make sure the SiteURL and the ListenAddress matching the new environment or the mattermost service in mattermost/docker might not be enabled correctly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the migration steps and the referenced docker-compose.yml, docker-compose.nginx.yml, config.json, and volumes paths. Check that the documentation covers SQL backup and restore, volume and plugin moves, ownership, and SiteURL and ListenAddress updates. Done means a newcomer can follow the commands to migrate the database, files, plugins, and configuration to mattermost/docker.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgresql, shell
Domain
databases, devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.