meilisearch / meilisearch-php

PHP wrapper for the Meilisearch API

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We need a way to delete dumps

K2ouMais opened this issue · comments

Description
There is a way to create dumps, but I am missing a way to delete older dumps and just keep the newest one.

I am thinking about something like:

# This should exist
$client->deleteDumps(); // Delete all dumps in dumps folder

# It would be really cool if we could just pass a TaskId and it would extract details->dumpUid and delete this specific file.
$client->deleteDump(TaskId); // Delete a specific dump 

or 

# We could pass the DumpUid that can be found under Tasks/Task
$client->deleteDump(dumpUid); // Delete a specific dump

Basic example

# This should exist
$client->deleteDumps(); // Delete all dumps in dumps folder

# It would be really cool if we could just pass a TaskId and it would extract details->dumpUid and delete this specific file.
$client->deleteDump(TaskId); // Delete a specific dump 

or 

# We could pass the DumpUid that can be found under Tasks/Task
$client->deleteDump(dumpUid); // Delete a specific dump

Other
We are using Meilisearch as a docker image and its needed to have a dump when upgrading to a new Meilisearch Version.
The Meilisearch data and dumps are in a docker volume and so we need a way to delete dumps, so that the volume doesnt get unnecessarily large.

I am not happy with the deployment process in docker with the volumes holding old data when the Meilisearch version changes. I have always to delete the volume with the data of a previous Meilisearch version and import everything in there again. Even if I have a dump it will say that the data from previous version cant be used and so the automatic dump wont be imported.

Thank you

Hello @K2ouMais!

This repo is "just" the PHP-SDK to access your meilisearch instance. Meilisearch itself doesn't expose an endpoint to delete a dump, therefore no SDK is able to delete a dump.

You may find other people running into the same restrictions as you do, maybe you can find them in the global discussions https://github.com/orgs/meilisearch/discussions or directly on the https://github.com/meilisearch/meilisearch repo