Files
upstream-mirror 240db4e2a7
Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Nightly Race / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
snapshot of https://github.com/mattermost/mattermost.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:29:55 +05:00

378 lines
18 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Migrate between self-hosted and Cloud"
---
This document outlines the process for migrating an existing Mattermost instance [from self-hosted to Cloud](#migrate-from-self-hosted-to-cloud), and [from Cloud to self-hosted](#migrate-from-cloud-to-self-hosted).
<Note>
Migrating an existing Mattermost instance to another using the same deployment method follows the same process that's documented below, regardless as to whether the source or destination of the migration is in the Cloud or self-hosted. **These steps will work for both Cloud and self-hosted Mattermost instances**.
</Note>
## Migrate from self-hosted to Cloud
When you migrate from self-hosted to Cloud, you'll need to open a ticket with the Mattermost Support team so they can assist you with the process. The information below describes the migration process. Before you get started, visit our [Support site](https://support.mattermost.com/hc/en-us/requests/new) to open a ticket.
<Important>
- This migration process is only available to customers using paid Mattermost editions.
- We recommend reviewing the knowledge base article on [migrating from self-hosted to Cloud](https://support.mattermost.com/hc/en-us/articles/4412503667604-Migrating-from-Self-hosted-Mattermost-Instance-to-Cloud-Mattermost-Instance) before starting a migration to familiarize yourself with key considerations, required prerequisites, and our guidance on testing your export.
</Important>
Before you begin your migration, take note of the following information before you begin:
**User Authentication**
If you are using the email login method, users will need to reset their passwords after the migration has been completed. Other authentication methods, such as LDAP and GitLab SSO, required changes to your infrastructure allowing the specific authentication method to function in Mattermost cloud.
**Plugins**
If you’re using plugins that aren’t listed on the Marketplace, they won’t be included in the export and you won’t have access to them going forward. See the list of supported plugins by visiting the [integrations overview](/integrations-guide/integrations-guide-index#plugins) documentation.
**Data**
The migration only includes data from Channels. No Playbooks data is exported.
### Migration process
**Export from your self-hosted instance**
Use your administrator credentials to log into your self-hosted Mattermost server. Once you're logged in, run:
```
mmctl export create --attachments
```
This creates a full export of the server, and includes attached files. If you don’t want to export attached files, leave out `--attachments`.
This process can take some time, so `mmctl` will return immediately, and the job will run in the background until the export is fully created. If successful, the command will immediately output a job ID, like this:
```
Export process job successfully created, ID: yfrr9ku5i7fjubeshs1ksrknzc
```
While the job is running, its status can be checked using the ID that was provided when it was created, and when it's done the output will look similar to this:
```
mmctl export job show yfrr9ku5i7fjubeshs1ksrknzc
ID: yfrr9ku5i7fjubeshs1ksrknzc
Status: success
Created: 2021-11-03 10:44:13 -0500 CDT
Started: 2021-11-03 10:44:23 -0500 CDT
```
The completed file will be downloaded to your desktop as a `.zip` file.
<Note>
Do not rename the file as the file name is referenced in log files, which are used by the Support team to validate the exported file.
</Note>
The Support team will provide you with S3 credentials so you can upload the exported file. Once you’ve uploaded the file, please contact the Support team and let them know.
### Create a new workspace on the Mattermost Cloud
In the meantime, you can log into Mattermost Cloud with your Mattermost credentials and create a Cloud workspace.
<Note>
Do not create any users in your Mattermost Cloud instance as the migration process performs this task for you.
</Note>
### Importing your data into your Mattermost Cloud instance
Once the export upload to the provided S3 bucket is complete and you’ve shared your Mattermost Cloud instance name/URL, Support can begin the import step.
Depending on the size of the export this process can take some time. Support will contact you as soon as the import is complete. During this time it is highly recommended you do not use your Mattermost Cloud instance.
### Start using your Mattermost Cloud instance
When the export is complete, you can log into your Cloud instance and can invite your users to log in.
<Note>
We recommend that you keep your self-hosted Mattermost server until you’ve been using your Cloud instance for a while and all is verified as is as expected.
</Note>
## Migrate from Cloud to self-hosted
You can migrate your Cloud workspace data to a self-hosted deployment at any time.
### How does the process work?
Before you export and migrate your data, you must [install Mattermost](/deployment-guide/deployment-guide-index) on the server you’ll be using to run Mattermost. The migration is done using the mmctl CLI tool, which is a remote CLI tool for Mattermost that's installed locally and uses the Mattermost API. `mmctl` is pre-installed.
The [mmctl usage notes](/administration-guide/manage/mmctl-command-line-tool#mmctl-usage-notes) provide some additional context and information which you can reference before and during the process.
You'll be using the [mmctl export](/administration-guide/manage/mmctl-command-line-tool#mmctl-export) commands to export your Cloud data for channels, messages, users, etc. The export file is downloaded to a location specified in the export commands. Once the export is complete, you'll import the data into your self-hosted instance.
Alternatively, you can export the data to an Amazon S3 cloud storage location in cases where an export is quite large and challenging to download from the Mattermost server. See the [create the export](#create-the-export) section below for details.
<Note>
Prior to migrating your data from Cloud, please ensure you have the appropriate permissions within your organization to carry out the data export which may contain sensitive information. Mattermost is not liable for any actions taken after the data export.
Moreover, the export process doesn’t include integrations or any custom data. Other aspects of your instance, such as specific security settings and requirements, are also not included. For assistance with migrating additional data and settings, see our support options: [https://mattermost.com/support/](https://mattermost.com/support/).
</Note>
Once `mmctl` is authenticated, you can generate the export from the source instance.
## Authenticate
Authentication is done with either Mattermost login credentials or an authentication token. First, use your administrator credentials to log into the instance with mmctl, replacing <code>example-source-domain.com</code> with the network address of the source instance:
```
mmctl auth login https://yourdomain.cloud.mattermost.com
```
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, and it's used to identify this set of credentials in the future, for your convenience. Then you will be able to start the export process.
## Create the export
<Important>
If your Mattermost Cloud deployment includes plugins that aren't listed on the Cloud Marketplace, those plugins won't be included in the export, and you won't have access to those plugins going forward. See the [integrations](/integrations-guide/integrations-guide-index#plugins) documentation for a list of Cloud-supported integrations.
</Important>
Once you're logged in, run the following `mmctl` command:
```
mmctl export create
```
Running this command creates a full export of the server, including attached files. Append `--no-attachments` if you do not wish to export attached files from your instance, and append `--with-archived-channels` to include archived channels in the export file. This process can take some time, so `mmctl` will return immediately, and the job will run in the background on the Mattermost instance until the export is fully created. If successful, the command will immediately output a job ID, like this:
```
Export process job successfully created, ID: yfrr9ku5i7fjubeshs1ksrknzc
```
While the job is running, its status can be checked using the ID that was provided when it was created, and when it's done the output will look similar to this:
```
mmctl export job show yfrr9ku5i7fjubeshs1ksrknzc
ID: yfrr9ku5i7fjubeshs1ksrknzc
Status: success
Created: 2021-11-03 10:44:13 -0500 CDT
Started: 2021-11-03 10:44:23 -0500 CDT
```
Once the status is `success`, download the export onto your local machine. First, discover the name of the completed export file with `mmctl export list`:
```
mmctl export list
r3kcj8yuwbramdt714doafi3oo_export.zip
```
This will show all of the exports on the server, so be sure to download the latest one and to delete it when you're done to save storage. Generate a link to download the file with a command like the following, but with the filename of the export on your server:
```
mmctl export generate-presigned-url r3kcj8yuwbramdt714doafi3oo_export.zip
```
<Tip>
- As an alternative to this last step, from your Mattermost Cloud web instance, you can retrieve the file download link to the export by using the Mattermost slash command `/exportlink [job-id|zip file|latest]`. Use the `latest` option to automatically pull the latest export available, or specify the download link by `job-id` or `zip file`.
- Mattermost v8.1.0-RC1 is required to use the `mmctl export generate-presigned-url` command on a self-hosted Mattermost instance. Access the [Mattermost Enterprise v8.1.0-RC1 binary](https://releases.mattermost.com/8.1.0-rc1/mattermost-enterprise-8.1.0-rc1-linux-amd64.tar.gz) or the [Mattermost Team Edition v8.1.0-RC1 binary](https://releases.mattermost.com/8.1.0-rc1/mattermost-team-8.1.0-rc1-linux-amd64.tar.gz).
</Tip>
## Upload the export to the new server
Finally, it's time to take our export from the source server and use it as an import into the destination server. Before proceeding, review and modify the following self-hosted Mattermost configuration settings, where applicable, to ensure a smooth and successful import.
<table style={{width: '100%'}}>
<colgroup>
<col style={{width: '39%'}} />
<col style={{width: '51%'}} />
<col style={{width: '8%'}} />
</colgroup>
<tbody>
<tr>
<td><strong>Mattermost configuration setting</strong></td>
<td><strong>Large file import recommendation</strong></td>
<td></td>
</tr>
<tr>
<td colspan="3"><a href="/administration-guide/configure/site-configuration-settings#max-users-per-team">Maximum Users Per Team | Increase this value to a number that **exceeds** the maximum number of users, per team, in the import file. |</a> |</td>
</tr>
<tr>
<td colspan="3"><a href="/administration-guide/configure/environment-configuration-settings#maximum-file-size">Maximum File Size | Temporarily increase this value to be **larger** than the size of the import file. |</a> | Following a successful import, we strongly recommend reverting this value to a reasonable limit for daily expected usage. |</td>
</tr>
<tr>
<td colspan="3"><dl>
<dt><a href="/administration-guide/configure/environment-configuration-settings#write-timeout">Write Timeout | Temporarily adjust this value based on import file speed and network path to enable the file to upload without timeouts. |</a> | Start with a value of <strong>3600</strong> and adjust if needed. |</dt>
<dd>
<div class="line-block">Following a successful import, we strongly recommend reverting this setting to its initial or previous value. |</div>
</dd>
</dl></td>
</tr>
<tr>
<td colspan="3"><dl>
<dt><a href="/administration-guide/configure/environment-configuration-settings#read-timeout">Read Timeout | Temporarily adjust this value based on import file speed and network path to enable the file to upload without timeouts. |</a> | Start with a value of <strong>3600</strong> and adjust if needed. |</dt>
<dd>
<div class="line-block">Following a successful import, we strongly recommend reverting this setting to its initial or previous value. |</div>
</dd>
</dl></td>
</tr>
<tr>
<td colspan="3"><a href="/administration-guide/configure/environment-configuration-settings#amazon-s3-request-timeout">Amazon S3 Request Timeout | If using cloud-based file storage, adjust this value to ensure your storage requests don't time out too soon. |</a> |</td>
</tr>
</tbody>
</table>
Next, log into the destination server using `mmctl` the same way you logged into the source server:
```
mmctl auth login https://localinstance.company.com
```
Use the following command to upload the export to the destination server. The speed of the upload may vary based on connection speed. When the upload is complete the command will return with the ID of the import:
```
mmctl import upload r3kcj8yuwbramdt714doafi3oo_export.zip
Upload session successfully created, ID: cfuq6q9kkjrqfgnph1pew3db4e
Import file successfully uploaded, name: xrzs9wrzufntbfcxpy39mdq9hy
```
## Complete the import into the new server
```
mmctl import list available
cfuq6q9kkjrqfgnph1pew3db4e_r3kcj8yuwbramdt714doafi3oo_export.zip
```
Run the import job to process to import the export file into the server. The speed of this process may vary based on connection speed. First, start the import process:
```
mmctl import process cfuq6q9kkjrqfgnph1pew3db4e_r3kcj8yuwbramdt714doafi3oo_export.zip
```
Once you've marked the file for processing, you can check the status of the job using `mmctl import job list`:
```
mmctl --local import job list
ID: f93jxu1hzty79enwa1xy6f1tbr
Status: pending
Created: 2021-10-28 13:32:55 +0200 CEST
```
When the job is complete, the `success` status is displayed:
```
mmctl --local import job list
ID: f93jxu1hzty79enwa1xy6f1tbr
Status: success
Created: 2021-10-28 13:32:55 +0200 CEST
Started: 2021-10-28 13:33:05 +0200 CEST
```
Then extract the export file to use it by running the following mmctl command:
```
mmctl extract run [flags].
```
Once your migration is complete and you’ve imported your data into your self-hosted instance we recommend that you take a few days to validate your data and ensure everything is working as expected before taking down your Cloud instance.
<Note>
If you are using email/password authentication, your users must reset their passwords.
</Note>
If you encounter any issues or problems, [contact our support team](https://mattermost.com/support/), or visit the [Mattermost Help Center](https://support.mattermost.com/).
## Migrate from self-hosted to Cloud
When you migrate from self-hosted to Cloud, you'll need to open a ticket with the Mattermost Support team so they can assist you with the process. The information below describes the migration process. Before you get started, visit our [Support site](https://support.mattermost.com/hc/en-us/requests/new) to open a ticket.
<Note>
This migration process is only available to customers using paid Mattermost editions.
</Note>
Before you begin your migration, take note of the following information before you begin:
**User Authentication**
If you are using the email login method, users will need to reset their passwords after the migration has been completed. Other authentication methods, such as LDAP and GitLab SSO, required changes to your infrastructure allowing the specific authentication method to function in Mattermost cloud.
**Plugins**
If you’re using plugins that aren’t listed on the Marketplace, they won’t be included in the export and you won’t have access to them going forward. You can view the list of plugins [in the Support knowledgebase](https://support.mattermost.com/hc/en-us/articles/5346624843924-Mattermost-Plugin-Marketplace-List-as-of-November-12th-2024).
**Data**
The migration only includes channel data. No collaborative playbooks data is exported.
### Migration process
**Export from your self-hosted instance**
Use your administrator credentials to log into your self-hosted Mattermost server. Once you're logged in, run:
```
mmctl export create --attachments
```
This creates a full export of the server, and includes attached files. If you don’t want to export attached files, leave out `--attachments`.
This process can take some time, so `mmctl` will return immediately, and the job will run in the background until the export is fully created. If successful, the command will immediately output a job ID, like this:
```
Export process job successfully created, ID: yfrr9ku5i7fjubeshs1ksrknzc
```
While the job is running, its status can be checked using the ID that was provided when it was created, and when it's done the output will look similar to this:
```
mmctl export job show yfrr9ku5i7fjubeshs1ksrknzc
ID: yfrr9ku5i7fjubeshs1ksrknzc
Status: success
Created: 2021-11-03 10:44:13 -0500 CDT
Started: 2021-11-03 10:44:23 -0500 CDT
```
The completed file will be downloaded to your desktop as a `.zip` file.
<Note>
Do not rename the file as the file name is referenced in log files, which are used by the Support team to validate the exported file.
</Note>
The Support team will provide you with S3 credentials so you can upload the exported file. Once you’ve uploaded the file, please [contact our support team](https://mattermost.com/support/) and let them know.
### Create a new workspace on the Mattermost Cloud
In the meantime, you can log into Mattermost Cloud with your Mattermost credentials and create a Cloud workspace.
<Note>
Do not create any users in your Mattermost Cloud instance as the migration process performs this task for you.
</Note>
### Importing your data into your Mattermost Cloud instance
Once the export upload to the provided S3 bucket is complete and you’ve shared your Mattermost Cloud instance name/URL, Support can begin the import step.
Depending on the size of the export this process can take some time. Support will contact you as soon as the import is complete. During this time it is highly recommended you do not use your Mattermost Cloud instance.
### Start using your Mattermost Cloud instance
When the export is complete, you can log into your Cloud instance and can invite your users to log in.
<Note>
We recommend that you keep your self-hosted Mattermost server until you’ve been using your Cloud instance for a while and all is verified as is as expected.
</Note>