You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn/self_hosted/configure_meilisearch_at_launch.mdx
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,6 +237,23 @@ Meilisearch automatically collects data from all instances that do not opt out u
237
237
238
238
[Read more about our policy on data collection](/learn/resources/telemetry), or take a look at [the comprehensive list of all data points we collect](/learn/resources/telemetry#exhaustive-list-of-all-collected-data).
Migrates the database to a new Meilisearch version after you have manually updated the binary.
248
+
249
+
[Learn more about updating Meilisearch to a new release](/learn/update_and_migration/updating).
250
+
251
+
<Capsuleintent="danger"title="Create a snapshot before a dumpless upgrade">
252
+
Take a snapshot of your instance before performing a dumpless upgrade.
253
+
254
+
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.
255
+
</Capsule>
256
+
240
257
### Dump directory
241
258
242
259
**Environment variable**: `MEILI_DUMP_DIR`<br />
@@ -303,7 +320,7 @@ Meilisearch currently supports five log levels, listed in order of increasing ve
303
320
-`'TRACE'`: log all events and include even more detailed information on Meilisearch's internal processes. We do not advise using this level as it is extremely verbose. Use `'DEBUG'` before considering `'TRACE'`.
@@ -36,13 +36,124 @@ Once the project has been successfully updated, you will receive an email confir
36
36
37
37
## Updating a self-hosted Meilisearch instance
38
38
39
+
You may update a self-hosted instance in one of two ways: with or without a dump.
40
+
39
41
<Capsuleintent="warning">
40
42
This guide only works for v0.15 and above. If you are using an older Meilisearch release, please [contact support](https://discord.meilisearch.com) for more information.
Dumpless upgrades are available when upgrading from Meilisearch >=v1.12 to Meilisearch >=v1.13
48
+
49
+
#### Step 1: Make a backup
50
+
51
+
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:
52
+
53
+
```sh
54
+
curl \
55
+
-X POST 'MEILISEARCH_URL/snapshots'
56
+
```
57
+
58
+
Meilisearch will respond with a partial task object. Use its `taskUid` to monitor the snapshot creation status. Once the task is completed, proceed to the next step.
Meilisearch should launch normally and immediately create a new `UpgradeDatabase` task. This task is processed immediately and cannot be canceled. You may follow its progress by using the `GET /tasks?types=UpgradeDatabase` endpoint to obtain its `taskUid`, then querying `GET /tasks/TASK_UID`.
145
+
146
+
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.
147
+
148
+
<Capsuleintent="warning">
149
+
If after the upgrade is completed the task status is set to `failed` or Meilisearch returns internal error messages to your queries, [restart your instance from the snapshot](/learn/data_backup/snapshots#starting-from-a-snapshot) you generated during step 1. You may then retry the upgrade, or upgrade using a dump. You are also welcome to open an issue on the [Meilisearch repository](https://github.com/meilisearch/meilisearch).
150
+
</Capsule>
151
+
152
+
### Using a dump
153
+
154
+
#### Step 1: Export data
44
155
45
-
#### Verify your database version
156
+
#####Verify your database version
46
157
47
158
First, verify the version of Meilisearch that's compatible with your database using the get version endpoint:
48
159
@@ -66,7 +177,7 @@ If you get the `missing_authorization_header` error, you might be using **v0.24
66
177
67
178
If your [`pkgVersion`](/reference/api/version#version-object) is 0.21 or above, you can jump to [creating the dump](#create-the-dump). If not, proceed to the next step.
68
179
69
-
#### Set all fields as displayed attributes
180
+
#####Set all fields as displayed attributes
70
181
71
182
<Capsuleintent="note">
72
183
If your dump was created in Meilisearch v0.21 or above, [skip this step](#create-the-dump).
@@ -95,7 +206,7 @@ This command returns an `updateId`. Use the get update endpoint to track the sta
95
206
96
207
Once the status is `processed`, you're good to go. Repeat this process for all indexes, then move on to creating your dump.
97
208
98
-
#### Create the dump
209
+
#####Create the dump
99
210
100
211
Before creating your dump, make sure that your [dump directory](/learn/self_hosted/configure_meilisearch_at_launch#dump-directory) is somewhere accessible. By default, dumps are created in a folder called `dumps` at the root of your Meilisearch directory.
101
212
@@ -183,9 +294,9 @@ For v0.27 and below, the response to your request returns a dump `uid`. Use it
183
294
184
295
Once the `dumpCreation` task shows `"status": "succeeded"`, you're ready to move on.
185
296
186
-
### Step 2: Prepare for migration
297
+
####Step 2: Prepare for migration
187
298
188
-
#### Stop the Meilisearch instance
299
+
#####Stop the Meilisearch instance
189
300
190
301
Stop your Meilisearch instance.
191
302
@@ -210,7 +321,7 @@ You may need to prefix the above command with `sudo` if you are not connected as
210
321
</Tabs.Content>
211
322
</Tabs.Container>
212
323
213
-
#### Create a backup
324
+
#####Create a backup
214
325
215
326
Instead of deleting `data.ms`, we suggest creating a backup in case something goes wrong. `data.ms` should be at the root of the Meilisearch binary unless you chose [another location](/learn/self_hosted/configure_meilisearch_at_launch#database-path).
Importing a dump requires indexing all the documents it contains. Depending on the size of your dataset, this process can take a long time and cause a spike in memory usage.
308
419
309
-
#### Restart Meilisearch as a service
420
+
#####Restart Meilisearch as a service
310
421
311
422
If you're running a **cloud instance**, press `Ctrl`+`C` to stop Meilisearch once your dump has been correctly imported. Next, execute the following command to run the script to configure Meilisearch and restart it as a service:
0 commit comments