Import from Mattermost
You can import your current workspace into a Zulip organization. It’s a great way to preserve your workspace history when you migrate to Zulip, and to make the transition easy for the members of your organization.
The import will include your organization’s:
- Name and Logo
- Message history, including attachments and emoji reactions
- Users and account fields supported by the source export, such as names, emails, roles, avatars, time zones, and custom profile fields
- Channels, including all user subscriptions
- Custom emoji
Import process overview
Section titled “Import process overview”To import your Mattermost organization into Zulip, you will need to take the following steps, which are described in more detail below:
- Export your Mattermost data.
- Import your Mattermost data into Zulip.
- Get your organization started with Zulip!
Import your organization from Mattermost into Zulip
Section titled “Import your organization from Mattermost into Zulip”Export your Mattermost data
Section titled “Export your Mattermost data”Mattermost’s bulk export tool allows you to export all public and private channel messages.
The instructions below correspond to various common ways Mattermost is installed; if yours isn’t covered, contact us and we’ll help you out.
Replace <username> and <server_ip> with the appropriate values below.
- SSH into your Mattermost production server.
Terminal window ssh <username>@<server_ip> - Navigate to the
../server/bin/directory in your Mattermost installation and locate themmctlexecutable. All subsequentmmctlcommands are executed using this executable. - Log in to a
mmctlinstance.You’ll be prompted for a username (use your admin user), password, and for a connection name. The connection name can be anything you want.Terminal window mmctl auth login <server_ip> - Create a full export of the server, including attached files.
Terminal window mmctl export create - List all of the exports on the server, and copy the name of the
latest one to your clipboard.
Terminal window mmctl export list - Download the export file to the server, replacing
latest_exportwith the actual file name from the previous step and/local/dir/with the download destination.Terminal window mmctl export download latest_export.zip /local/dir/latest_export.zip - Finally, copy the exported zip to your local computer.
Terminal window scp <username>@<server_ip>:/local/dir/latest_export.zip /local/dir
- Log in to your Mattermost cloud instance.
- Navigate to the
../server/bin/directory in your Mattermost installation and locate themmctlexecutable. All subsequentmmctlcommands are executed using this executable. - Log in to a
mmctlinstance.You’ll be prompted for a username (use your admin user), password, and for a connection name. The connection name can be anything you want.Terminal window mmctl auth login <server_ip> - Create a full export of the server, including attached files.
Terminal window mmctl export create - List all of the exports on the server, and copy the name of the
latest one to your clipboard.
Terminal window mmctl export list - Download the export file to the server, replacing
latest_exportwith the actual file name from the previous step and/local/dir/with the download destination.Terminal window mmctl export download latest_export.zip /local/dir/latest_export.zip - Finally, copy the exported zip file to your local computer.
Terminal window scp <username>@<server_ip>:/local/dir/latest_export.zip /local/dir
-
SSH into the server hosting your Mattermost docker container.
Terminal window ssh <username>@<server_ip> -
Navigate to the
../server/bin/directory in your Mattermost installation and locate themmctlexecutable. All subsequentmmctlcommands are executed using this executable. -
Create a full export of the server, including attached files.
Terminal window docker exec -it mattermost-docker_app_1 mmctl export create -
List all of the exports on the server, and copy the name of the latest one to your clipboard.
Terminal window docker exec -it mattermost-docker_app_1 mmctl export list -
Download the export file to the server, replacing
latest_exportwith the actual file name from the previous step and/local/dir/with the download destination.Terminal window docker exec -it mattermost-docker_app_1 mmctl export download latest_export.zip /local/dir/latest_export.zip -
Copy the downloaded archive from the container to the host server.
Terminal window docker cp mattermost-docker_app_1:/local/dir/latest_export.zip /local/dir/latest_export.zip -
Finally, copy the exported zip file to your local computer.
Terminal window scp <username>@<server_ip>:/local/dir/latest_export.zip /local/dir
- SSH into your GitLab Omnibus server.
Terminal window ssh <username>@<server_ip> - Create an export of all your Mattermost teams, as a tar file.
Terminal window cd /opt/gitlab/embedded/service/mattermostsudo -u \mattermost /opt/gitlab/embedded/bin/mattermost \--config=/var/opt/gitlab/mattermost/config.json \export bulk export.json --all-teams --attachmentsmkdir -p exported_emojitar --transform 's|^|mattermost/|' -czf export.tar.gz \data/ exported_emoji/ export.json - Exit your shell on the GitLab Omnibus server.
Terminal window exit - Finally, copy the exported tar file from GitLab Omnibus to your local computer.
Terminal window scp <username>@<server_ip>:/opt/gitlab/embedded/service/mattermost/export.tar.gz .
Import your data into Zulip
Section titled “Import your data into Zulip”Choose how the destination server will be hosted with your operator or administrator before transferring the export. Confirm its version, supported import format, organization address and access permissions.
Contact your operator to agree on the destination and a protected transfer method. Provide:
- The requested organization address. Confirm the domain, new organization creation, supported server version and required import scope with the operator.
- The exported data containing your workspace history, using the agreed transfer method. Confirm which private messages and personal data are included.
Import into a self-hosted Zulip server
Agree on the supported import format, server version, disk and memory requirements with your administrator. Run a trial import and check its results before the final migration. For large exports or performance issues, contact support.
- Follow steps 1 and 2 of the guide for installing a new Zulip server.
- Copy the exported data file containing your workspace message
history export onto your Zulip server, and put it in
/tmp/. - Log in to a shell on your Zulip server as the
zulipuser. - To import into an organization hosted on the root domain
(
EXTERNAL_HOST) of the Zulip installation, run the following commands, replacing<team-name>with the name of the Mattermost team you want to import.By default Mattermost teams will be converted into their own Zulip organizations, to convert all Mattermost teams into one Zulip organization, run:Terminal window cd /tmptar -xf mattermost_data.tar.gzcd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_mattermost_data /tmp/mattermost_data --output /tmp/converted_mattermost_data./manage.py import '' /tmp/converted_mattermost_data/<team-name>./scripts/start-serverAlternatively, to import into a custom subdomain, run:Terminal window ./manage.py convert_mattermost_data /tmp/mattermost_data --output /tmp/converted_mattermost_data --combine-teams-into-one-orgTerminal window cd /tmptar -xf mattermost_data.tar.gzcd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_mattermost_data /tmp/mattermost_data --output /tmp/converted_mattermost_data./manage.py import <subdomain> /tmp/converted_mattermost_data/<team-name>./scripts/start-server - Follow step 4 of the guide for installing a new Zulip server.
Import into a self-hosted Zulip server
Agree on the supported import format, server version, disk and memory requirements with your administrator. Run a trial import and check its results before the final migration. For large exports or performance issues, contact support.
- Follow steps 1 and 2 of the guide for installing a new Zulip server.
- Copy the exported data file containing your workspace message
history export onto your Zulip server, and put it in
/tmp/. - Log in to a shell on your Zulip server as the
zulipuser. - To import into an organization hosted on the root domain
(
EXTERNAL_HOST) of the Zulip installation, run the following commands, replacing<team-name>with the name of the Mattermost team you want to import.Alternatively, to import into a custom subdomain, run:Terminal window unzip latest_export.zip -d /tmp/my_mattermost_exportmv /tmp/my_mattermost_export/import.jsonl /tmp/my_mattermost_export/export.jsoncd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_mattermost_data /tmp/my_mattermost_export --output /tmp/converted_mattermost_data./manage.py import '' /tmp/converted_mattermost_data/<team-name>./scripts/start-serverTerminal window unzip latest_export.zip -d /tmp/my_mattermost_exportmv /tmp/my_mattermost_export/import.jsonl /tmp/my_mattermost_export/export.jsoncd /home/zulip/deployments/current./scripts/stop-server./manage.py convert_mattermost_data /tmp/my_mattermost_export --output /tmp/converted_mattermost_data./manage.py import <subdomain> /tmp/converted_mattermost_data/<team-name>./scripts/start-server - Follow step 4 of the guide for installing a new Zulip server.
Import details
Section titled “Import details”Whether your operator manages the server or your organization maintains it, here are a few notes to keep in mind about the import process:
- Mattermost does not export workspace settings, so you will need to configure the settings for your Zulip organization. This includes settings like email visibility, message editing permissions, and how users can join your organization.
- Mattermost’s user roles are mapped to Zulip’s user
roles in the following way:
Mattermost role Zulip role Team administrator Owner Member Member - Mattermost’s export tool does not support exporting user avatars or message edit history.
- Direct messages will only be imported from Mattermost workspaces containing a single team. This is because Mattermost’s data exports do not associate direct messages with a specific Mattermost team.
- Messages in threads are imported, but they are not explicitly marked as being in a thread.
Get your organization started with Zulip
Section titled “Get your organization started with Zulip”Once the import process is completed, you will need to:
- Configure the settings for your organization, which are not exported. This includes settings like email visibility, message editing permissions, and how users can join your organization.
- All users from your previous workspace will have accounts in your new Zulip organization. However, you will need to let users know about their new accounts, and decide how they will log in for the first time.
- Share the URL for your new Zulip organization, and (recommended) the Getting started with Zulip guide.
- Migrate any integrations.
Decide how users will log in
Section titled “Decide how users will log in”When user accounts are imported, users initially do not have passwords configured. There are a few options for how users can log in for the first time.
Allow users to log in with non-password authentication
After the administrator enables and configures the required identity providers, users can log in with authentication methods that do not require a password. Supported providers depend on your server configuration and can include Google, GitHub, GitLab, Apple, Discord, LDAP and SAML.
Send password reset emails to all users
You can send password reset emails to all users in your organization, which will allow them to set an initial password.
If your operator manages the destination server, contact support to arrange initial password reset emails. Confirm email delivery and account matching with a test user before the organization-wide send.
Send password reset emails (self-hosted organization)
- To test the process, start by sending yourself a password reset email by
using the following command:
Terminal window ./manage.py send_password_reset_email -u username@example.com - When ready, send password reset emails to all users by
using the following command:
Terminal window ./manage.py send_password_reset_email -r '' --all-users
- To test the process, start by sending yourself a password reset email by
using the following command:
Terminal window ./manage.py send_password_reset_email -u username@example.com - When ready, send password reset emails to all users by
using the following command:
If you would like to only send emails to users who have not logged in yet, you can use the following variant instead:
Terminal window ./manage.py send_password_reset_email -r <subdomain> --all-usersTerminal window ./manage.py send_password_reset_email -r <subdomain> --all-users --only-never-logged-in
Manual password resets
Alternatively, users can reset their own passwords by following the instructions on your Zulip organization’s login page.
View imported user accounts
You can see and manage a list of imported users who have not logged in yet to activate their Zulip account.
- Navigate to the Users tab of the Organization settings menu.
- Select the Imported tab.