Migrating data between Meilisearch instances
The "dump export/import" approach
Meilisearch has a built-in mechanism for exporting the entire contents of an instance to a single file, and importing that file into another instance. This is the supported way to move indexed data between two Meilisearch installations, including moving to a newer Meilisearch version.
For this to work, we need a Source Meilisearch instance and a Destination Meilisearch instance, both installed as described in the Installation section of this document.
|
While the source instance’s data will remain unchanged after this procedure, all existing data on your destination instance - across every tenant’s index - will be overwritten by the data imported from the source. A dump contains every index on the source instance; there’s no way to export or import just a single tenant’s index. |
|
Dumps can be used to move data forward from an older Meilisearch version to a newer one, and this can be done in a single step regardless of how many versions apart source and destination are. Dumps cannot be used to move data backward, from a newer Meilisearch version to an older release. |
-
On the source Meilisearch instance, trigger a dump export by calling the Meilisearch API:
curl -X POST 'http://<source-host>:7700/dumps' -H 'Authorization: Bearer <source-MASTER_KEY>'This returns a summarized task with a
taskUidand a status ofenqueued. Dump creation happens asynchronously and can take time proportional to the size of the source instance’s data. -
Check the status of the dump task using its
taskUid:curl -X GET 'http://<source-host>:7700/tasks/<taskUid>' -H 'Authorization: Bearer <source-MASTER_KEY>'Wait until the task’s
statusfield readssucceeded. The task’sdetails.dumpUidfield names the resulting dump file. -
By default, Meilisearch writes the dump file to a
dumpsfolder alongside themeilisearch-windows-amd64.exebinary on the source host, named<dumpUid>.dump. Copy this file to the destination host. -
Stop the Meilisearch Windows service on the destination host.
-
If the destination instance already has data you don’t need to keep, remove or rename its existing
data.msfolder (found alongside the Meilisearch binary) before continuing - a dump can’t be imported over existing data. -
From a command prompt on the destination host, run the Meilisearch binary directly (not via the Windows service) with the
--import-dumpoption, pointing at the copied dump file:meilisearch-windows-amd64.exe --import-dump C:\path\to\<dumpUid>.dumpMeilisearch’s HTTP API isn’t available while a dump import is in progress. The import is complete once the console output indicates Meilisearch has finished starting up.
-
Stop this manually started instance (Ctrl+C), then start the destination Meilisearch Windows service normally. It will start against the newly imported data, without needing the
--import-dumpoption again. -
Verify the destination instance using its built-in mini-dashboard at
http://<destination-host>:7700, or by checking the Full Text Search and Index Settings status in QMS.
|
A dump doesn’t carry over the source instance’s master key. If the destination instance’s |
Limitations of this approach
|
A dump contains every tenant’s index on the source instance - there’s no way to migrate a single tenant in isolation. The Meilisearch Windows service must be stopped on the destination for the duration of the import, meaning full text search is unavailable to every tenant on that instance until the import completes. Dumps can only move data forward across Meilisearch versions, never backward. |