We expose one single route on the instance which accepts a bunch of parameters.
url
: Where do we want to send our settings and documents.apiKey
: (optional) The API key to have the rights to send those requests. Usually the master key of the remote machine.payloadSize
: (optional) A human readable size defining the size of the payloads to send. Defaults to 50 MiB.indexes
: (optional) A set of patterns of matching the indexes you want to export. If not defined, defaults to all indexes without filter.
filter
: (optional) A filter defining the subset of documents to actually export.overrideSettings
: (optional, default false) When false, will not set settings nor update the primary key on indexes that already exist on the remote instance. Will still send the documents// POST /export
{
"url": "<http://localhost:7711>",
"apiKey": null,
"payloadSize": "123 MiB",
"indexes": {
"*": {
"filter": null,
"overrideSettings": true
}
}
}
{
"taskUid": 2,
"indexUid": null,
"status": "enqueued",
"type": "export",
"enqueuedAt": "2025-06-26T12:54:10.785864Z"
}
{
"uid": 8,
"progress": {
"steps": [
{
"currentStep": "processing tasks",
"finished": 0,
"total": 2
},
{
"currentStep": "Exporting index `movies`",
"finished": 0,
"total": 1
},
{
"currentStep": "document",
"finished": 2200,
"total": 31944
}
],
"percentage": 3.443526
},
"details": {
"url": "<http://localhost:7711>",
"payloadSize": "1 GiB",
"indexes": {
"*": {
"filter": null
}
}
},
"stats": {
"totalNbTasks": 1,
"status": {
"processing": 1
},
"types": {
"export": 1
},
"indexUids": {}
},
"duration": null,
"startedAt": "2025-06-26T13:23:00.321422Z",
"finishedAt": null,
"batchStrategy": "stopped after the last task of type `export` because they cannot be batched with tasks of any other type."
}
{
"uid": 6,
"batchUid": 5,
"indexUid": null,
"status": "succeeded",
"type": "export",
"canceledBy": null,
"details": {
"url": "<http://localhost:7711>",
"apiKey": "XXX...",
"payloadSize": "1 GiB",
"indexes": {
"movies": {
"matched_documents": 31944
}
}
},
"error": null,
"duration": "PT0.446478S",
"enqueuedAt": "2025-06-30T16:46:01.760116Z",
"startedAt": "2025-06-30T16:46:01.772816Z",
"finishedAt": "2025-06-30T16:46:02.219294Z"
}
One task can retry requests in case of failure (not indefinitely, though) and can also be canceled. However, keep in mind that canceling this export task will not cancel tasks received by the targeted Meilisearch instance.
We send the Export Triggered
event when the export route is called. It features the following parameters:
total_received
: number of export received in this batchhas_api_key
: number of export with an API Key setavg_index_patterns
: avg number of patterns set by exportavg_patterns_with_filter
: avg number of patterns with filter by exportavg_payload_size
: avg payload size by exportInvalidExportUrl
, InvalidExportApiKey
, InvalidExportPayloadSize
, InvalidExportIndexesPatterns
, InvalidExportIndexFilter
are new invalid requests errors. They all return a new direct error message to the user on the call to the export route.