> ## Documentation Index
> Fetch the complete documentation index at: https://www.meilisearch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating to Meilisearch Cloud

> Meilisearch Cloud is the recommended way of using Meilisearch. This guide walks you through migrating Meilisearch from a self-hosted installation to Meilisearch Cloud.

There are two ways to migrate a self-hosted Meilisearch instance to Meilisearch Cloud:

|                   | Track 1: Export API                                               | Track 2: Dumps                                                       |
| ----------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------- |
| **How it works**  | Pushes data directly from your instance to Cloud over the network | Creates a file on disk that you upload when creating a Cloud project |
| **Best for**      | Running instances with network access to Cloud                    | Offline transfers, backups, or version upgrades                      |
| **File handling** | None                                                              | Must download dump file and upload during project creation           |

## Requirements

* A running Meilisearch instance
* A command-line terminal
* A Meilisearch Cloud account and project

***

## Track 1: Export API (recommended)

The export API pushes your data directly from your self-hosted instance to a remote Meilisearch instance without creating any intermediate files.

### 1. Create a Meilisearch Cloud project

Navigate to [Meilisearch Cloud](https://cloud.meilisearch.com) and create a new project. Once it is ready, note down your project URL and API key from the project overview.

### 2. Run the export

On your self-hosted instance, send a `POST /export` request pointing to your Cloud project:

<CodeGroup>
  ```bash cURL theme={null}
  curl \
    -X POST 'MEILISEARCH_URL/export' \
    -H 'Content-Type: application/json' \
    --data-binary '{
      "url": "TARGET_INSTANCE_URL",
      "indexes": {
        "*": {
          "overrideSettings": true
        }
      }
    }'
  ```

  ```python Python theme={null}
  client.export(
    url='https://remote-meilisearch-instance.com',
    api_key='masterKey',
    payload_size='50 MiB',
    indexes={
      'movies*': {},
      'books*': {},
    },
  )
  ```

  ```java Java theme={null}
  Map<String, ExportIndexFilter> indexes = new HashMap<>();
  indexes.put("*", ExportIndexFilter.builder().overrideSettings(true).build());
  ExportRequest request = ExportRequest.builder().url("TARGET_INSTANCE_URL").indexes(indexes).build();
  client.export(request);
  ```

  ```dart Dart theme={null}
  await client.export(
    ExportQuery(
      url: exportSinkUrl,
      apiKey: 'new_instance_api_key',
      payloadSize: "100 MiB",
    ),
  );
  ```
</CodeGroup>

Replace `TARGET_INSTANCE_URL` with your Cloud project URL and add your Cloud API key via the `apiKey` field or an `Authorization` header.

Meilisearch returns a task object. [Use the `taskUid` to monitor its progress.](/capabilities/indexing/tasks_and_batches/async_operations)

### 3. Verify the migration

Once the task status is `succeeded`, open your Cloud project and run a few searches to confirm all data transferred correctly.

<Warning>
  Meilisearch Cloud automatically generates a new master key during project creation. If you are using [security keys](/resources/self_hosting/security/basic_security), update your application to use the newly generated Meilisearch Cloud API keys.
</Warning>

***

## Track 2: Dumps

Use this track if your self-hosted instance cannot reach Cloud directly, or if you prefer an offline file-based migration.

### 1. Export a dump from your self-hosted installation

A dump is a compressed file containing all your indexes, documents, and settings. Make sure your instance is running, then run:

<CodeGroup>
  ```bash cURL theme={null}
  curl \
    -X POST 'MEILISEARCH_URL/dumps'
  ```

  ```javascript JS theme={null}
  client.createDump()
  ```

  ```python Python theme={null}
  client.create_dump()
  ```

  ```php PHP theme={null}
  $client->createDump();
  ```

  ```java Java theme={null}
  client.createDump();
  ```

  ```ruby Ruby theme={null}
  client.create_dump
  ```

  ```go Go theme={null}
  resp, err := client.CreateDump()
  ```

  ```csharp C# theme={null}
  await client.CreateDumpAsync();
  ```

  ```rust Rust theme={null}
  client
    .create_dump()
    .await
    .unwrap();
  ```

  ```swift Swift theme={null}
  client.createDump { result in
      switch result {
      case .success(let dumpStatus):
          print(dumpStatus)
      case .failure(let error):
          print(error)
      }
  }
  ```

  ```dart Dart theme={null}
  await client.createDump();
  ```
</CodeGroup>

Meilisearch will return a summarized task object and begin creating the dump. [Use the returned object's `taskUid` to monitor its progress.](/capabilities/indexing/tasks_and_batches/async_operations)

Once the task completes, find the dump file in your project's dump directory (default: `/dumps`).

<Note>
  Instance configuration options and experimental features that can only be activated at launch are not included in dumps.

  Once you have successfully migrated your data to Meilisearch Cloud, use the project overview interface to reactivate available options. Not all instance options are supported in the Cloud.
</Note>

### 2. Create a Meilisearch Cloud project and import the dump

Navigate to [Meilisearch Cloud](https://cloud.meilisearch.com) and log in. You can only import dumps into new projects.

Click "Create a project" or "New project":

<Frame>
  <img src="https://mintcdn.com/meilisearch-6b28dec2/AA65w-9bZrf-CgFA/assets/images/cloud-migration/1-new-project.png?fit=max&auto=format&n=AA65w-9bZrf-CgFA&q=85&s=e7fd7464c7dc1ea71b18af4fff5f51dd" alt="The Meilisearch Cloud menu, featuring the 'New Project' button" width="1363" height="204" data-path="assets/images/cloud-migration/1-new-project.png" />
</Frame>

Fill in your project name, choose a server location, and select your plan. Then click "Import .dump" and select the dump file you generated:

<Frame>
  <img src="https://mintcdn.com/meilisearch-6b28dec2/AA65w-9bZrf-CgFA/assets/images/cloud-migration/2-import-dump.png?fit=max&auto=format&n=AA65w-9bZrf-CgFA&q=85&s=d9a4ad0acae62c348170f5403bf28ff6" alt="A modal window with three mandatory fields: 'Project name', 'Select a region', and 'Select a plan'. Further down, an optional field: 'Import .dump'" width="1182" height="919" data-path="assets/images/cloud-migration/2-import-dump.png" />
</Frame>

Meilisearch will start creating the project and importing your data. This may take a few moments depending on the size of your dataset.

<Warning>
  Meilisearch Cloud automatically generates a new master key during project creation. If you are using [security keys](/resources/self_hosting/security/basic_security), update your application to use the newly generated Meilisearch Cloud API keys.
</Warning>

### 3. Verify the migration

Once your project is ready, click on it to open the project overview. Click "Search preview" in the top bar and run a few test searches to confirm all data was migrated successfully.

***

Congratulations, you have migrated to Meilisearch Cloud. If you encounter any problems, reach out to our support team on [Discord](https://discord.meilisearch.com).
