Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion resources/help/experimental_features_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ The **logs** and **metrics** experimental features are not available on Meilisea
| [`CONTAINS` filter operator](/capabilities/filtering_sorting_faceting/advanced/filter_expression_syntax#contains) | Enables usage of `CONTAINS` with the `filter` search parameter | CLI flag or environment variable, API route |
| [Edit documents with function](/capabilities/indexing/how_to/edit_documents_with_functions) | Use a [Rhai](https://rhai.rs/book/) function to edit documents directly in the Meilisearch database | API route |
| [`/network` route](/reference/api/network/get-network) | Enable `/network` route | API route |
| [Dumpless upgrade](/resources/self_hosting/configuration/reference#dumpless-upgrade) | Upgrade Meilisearch without generating a dump | API route |
| [Composite embedders](/reference/api/settings/get-embedders) | Enable composite embedders | API route |
| [Chat completions](/reference/api/chats/update-settings-of-a-chat-workspace) | Enable chat completion capabilities | API route |
| [Get task documents route](/reference/api/async-task-management/list-tasks) | Enable route to retrieve documents from tasks | API route |
Expand Down
2 changes: 1 addition & 1 deletion resources/help/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For the full list, see [known limitations](/resources/help/known_limitations).

## How do I update Meilisearch?

Meilisearch Cloud instances can be updated with one click from the Cloud dashboard. For self-hosted instances, see the [update guide](/resources/migration/updating), which covers dumpless upgrades (v1.13+) and dump-based migration for older versions.
Meilisearch Cloud instances can be updated with one click from the Cloud dashboard. For self-hosted instances, see the [update guide](/resources/migration/updating), which covers upgrading with the `--upgrade-db` flag and dump-based migration for older versions.

## I keep getting a `400 - Bad Request` when adding documents

Expand Down
2 changes: 1 addition & 1 deletion resources/help/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ This list is liable to change with every new version of Meilisearch. It's not be
| `embedders.binary_quantization_used` | `true` if the user updated the binary quantized field of the embedded settings | false
| `infos.task_queue_webhook` | `true` if the instance is launched with a task queue webhook | false
| `infos.experimental_search_queue_size` | Size of the search queue | 750
| `infos.experimental_dumpless_upgrade` | `true` if instance is launched with the parameter | true
| `infos.upgrade_db` | `true` if instance is launched with the `--upgrade-db` parameter | true
| `locales` | List of locales used with `/search` and `/settings` routes | ["fra", "eng"]
| `federation.use_federation` | `true` when at least one multi-search request contains a top-level federation object | false
| `network_has_self` | `true` if the network object has a non-null self field | true
Expand Down
36 changes: 25 additions & 11 deletions resources/migration/updating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ description: Learn how to migrate to the latest Meilisearch release.
sidebarDepth: 3
---

import { NoticeTag } from '/snippets/notice_tag.mdx';

import CodeSamplesUpdatingGuideCheckVersionNewAuthorizationHeader from '/snippets/generated-code-samples/code_samples_updating_guide_check_version_new_authorization_header.mdx';
import CodeSamplesUpdatingGuideCreateDump from '/snippets/generated-code-samples/code_samples_updating_guide_create_dump.mdx';
import CodeSamplesCreateSnapshot1 from '/snippets/generated-code-samples/code_samples_create_snapshot_1.mdx';

Currently, Meilisearch databases are only compatible with the version of Meilisearch used to create them. The following guide will walk you through using a [dump](/resources/self_hosting/data_backup/dumps) to migrate an existing database from an older version of Meilisearch to the most recent one.
Meilisearch databases are only compatible with the version of Meilisearch used to create them. The following guide will walk you through upgrading an existing database from an older version of Meilisearch to the most recent one, either with the `--upgrade-db` flag or with a [dump](/resources/self_hosting/data_backup/dumps).

If you're updating your Meilisearch instance on cloud platforms like DigitalOcean or AWS, ensure that you can connect to your cloud instance via SSH. Depending on the user you are connecting with (root, admin, etc.), you may need to prefix some commands with `sudo`.

Expand Down Expand Up @@ -41,15 +39,19 @@ Once the project has been successfully updated, you will receive an email confir

## Updating a self-hosted Meilisearch instance

You may update a self-hosted instance in one of two ways: with or without a dump.
To update a self-hosted instance, create a snapshot of your data, install the new binary, and relaunch Meilisearch with the `--upgrade-db` flag. Meilisearch then upgrades your database on startup.

In some cases, Meilisearch cannot upgrade your database this way and returns an error at launch. If that happens, [update your instance using a dump](#using-a-dump) instead.

### Dumpless upgrade <NoticeTag type="experimental" label="experimental" />
### Updating with the `--upgrade-db` flag

Dumpless upgrades are available when upgrading from Meilisearch >=v1.12 to Meilisearch >=v1.13
<Note>
The `--upgrade-db` flag is available since Meilisearch v1.51. If you are upgrading to an older version, use `--experimental-dumpless-upgrade` instead.
</Note>

#### Step 1: Make a backup

Dumpless upgrades are an experimental feature. Because of that, it may in rare occasions partially fail and result in a corrupted database. To prevent data loss, create a snapshot of your instance:
Database upgrades are not atomic. In rare occasions, the process may partially fail and result in a corrupted database. To prevent data loss, create a snapshot of your instance:

<CodeSamplesCreateSnapshot1 />

Expand Down Expand Up @@ -118,22 +120,22 @@ mv meilisearch /usr/bin/meilisearch

#### Step 4: Relaunch Meilisearch

Execute the command below to import the dump at launch:
Relaunch Meilisearch with the `--upgrade-db` flag:

<Tabs>

<Tab title="Local installation">

```bash
./meilisearch --experimental-dumpless-upgrade
./meilisearch --upgrade-db
```

</Tab>

<Tab title="Cloud platforms">

```sh
meilisearch --experimental-dumpless-upgrade
meilisearch --upgrade-db
```

</Tab>
Expand All @@ -143,13 +145,23 @@ Meilisearch should launch normally and immediately create a new `UpgradeDatabase

While the task is processing, you may continue making search queries. You may also enqueue new tasks. Meilisearch will only process new tasks once `UpgradeDatabase` is completed.

#### If Meilisearch fails to launch with an error

Meilisearch cannot upgrade databases created with versions older than v1.12. In that case, it fails to launch and returns the following error:

```
Database version X.Y.Z is too old to be upgraded via `--upgrade-db`. Please generate a dump using the vX.Y.Z and import it in the vA.B.C
```

If you see this error, reinstall the Meilisearch version your database was created with, relaunch your instance, then [update it using a dump](#using-a-dump).

#### Rolling back an update

If the upgrade is taking too long, or if after the upgrade is completed its task status is set to `failed`, you can cancel the upgrade task.

Cancelling the update task automatically rolls back your database to its state before the upgrade began.

After launching Meilisearch with `--experimental-dumpless-upgrade` flag:
After launching Meilisearch with the `--upgrade-db` flag:

1. Cancel the `upgradeDatabase` task
2. If you cancelled the update before it failed, skip to the next step. If the update failed, relaunch Meilisearch using the binary of the version you were upgrading to
Expand All @@ -161,6 +173,8 @@ If you are upgrading Meilisearch to \<= v1.14, you must instead [restart your in

### Using a dump

Use this method when Meilisearch cannot upgrade your database with the `--upgrade-db` flag.

#### Step 1: Export data

##### Verify your database version
Expand Down
12 changes: 8 additions & 4 deletions resources/self_hosting/configuration/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,27 @@ Meilisearch automatically collects data from all instances that do not opt out u

[Read more about our policy on data collection](/resources/help/telemetry), or take a look at [the comprehensive list of all data points we collect](/resources/help/telemetry#exhaustive-list-of-all-collected-data).

### Dumpless upgrade <NoticeTag type="experimental" label="experimental" />
### Dumpless upgrade

**Environment variable**: `MEILI_EXPERIMENTAL_DUMPLESS_UPGRADE`<br />
**CLI option**: `--experimental-dumpless-upgrade`<br />
**Environment variable**: `MEILI_UPGRADE_DB`<br />
**CLI option**: `--upgrade-db`<br />
**Default value**: None<br />
**Expected value**: None

Migrates the database to a new Meilisearch version after you have manually updated the binary.

[Learn more about updating Meilisearch to a new release](/resources/migration/updating).

<Note>
Before Meilisearch v1.51, this option was named `--experimental-dumpless-upgrade` (environment variable: `MEILI_EXPERIMENTAL_DUMPLESS_UPGRADE`).
</Note>

<Warning>
#### Create a snapshot before a dumpless upgrade

Take a snapshot of your instance before performing a dumpless upgrade.

Dumpless upgrade are not currently atomic. It is possible some processes fail and Meilisearch still finalizes the upgrade. This may result in a corrupted database and data loss.
Dumpless upgrades are not currently atomic. It is possible some processes fail and Meilisearch still finalizes the upgrade. This may result in a corrupted database and data loss.
</Warning>

### Dump directory
Expand Down
Loading