Skip to content

Commit 6d4b926

Browse files
add rollback instructions
1 parent 8c911dd commit 6d4b926

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

learn/update_and_migration/updating.mdx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Once the project has been successfully updated, you will receive an email confir
4747

4848
## Updating a self-hosted Meilisearch instance
4949

50-
<Warning>
5150
You may update a self-hosted instance in one of two ways: with or without a dump.
5251

52+
<Warning>
5353
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.
5454
</Warning>
5555

@@ -156,9 +156,21 @@ Meilisearch should launch normally and immediately create a new `UpgradeDatabase
156156

157157
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.
158158

159-
<Warning>
160-
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).
161-
</Warning>
159+
#### Rolling back an update
160+
161+
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.
162+
163+
Cancelling the update task to automatically rolls back your database to its state before the upgrade began.
164+
165+
After launching Meilisearch with `--experimental-dumpless-upgrade` flag:
166+
167+
1. Cancel the `databaseUpgrade` task
168+
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
169+
3. Wait for the cancel request to be processed
170+
4. Replace the new binary with the binary of the previous version
171+
5. Relaunch Meilisearch
172+
173+
If you are upgrading Meilisearch to <= v1.14, you must instead [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).
162174

163175
### Using a dump
164176

@@ -505,6 +517,10 @@ rm /var/opt/meilisearch/dumps/{dump_uid.dump}
505517
</Tabs.Content>
506518
</Tabs.Container>
507519

520+
## Cancel an update
521+
522+
If a Meilisearch update fails or takes too long, depending on your version you can either cancel the update task and automatically roll back to an earlier version of your database, or import a backup snapshot.
523+
508524
## Version-specific warnings
509525

510526
After migrating to the most recent version of Meilisearch, your code-base may require some changes. This section contains warnings for some of the most impactful version-specific changes. For full changelogs, see the [releases tab on GitHub](https://github.com/meilisearch/meilisearch/releases).

0 commit comments

Comments
 (0)