Module meilisearch_sdk::dumps [−][src]
The dumps
module allows the creation of database dumps.
Dumps are .dump
files that can be used to launch MeiliSearch.
Dumps are compatible between MeiliSearch versions.
Creating a dump is also referred to as exporting it, whereas launching MeiliSearch with a dump is referred to as importing it.
During a dump export, all indexes of the current instance are exported—together with their documents and settings—and saved as a single .dump
file.
During a dump import, all indexes contained in the indicated .dump
file are imported along with their associated documents and settings.
Any existing index with the same uid as an index in the dump file will be overwritten.
Dump imports are performed at launch using an option. Batch size can also be set at this time.
Example
let client = Client::new("http://localhost:7700", "masterKey"); // Create a dump let dump_info = client.create_dump().await.unwrap(); assert!(matches!(dump_info.status, DumpStatus::InProgress)); // Wait for MeiliSearch to proceed sleep(Duration::from_secs(5)); // Check the status of the dump let dump_info = client.get_dump_status(&dump_info.uid).await.unwrap(); assert!(matches!(dump_info.status, DumpStatus::Done));
Structs
DumpInfo | Limited informations about a dump. |
Enums
DumpStatus | The status of a dump. |
Functions
create_dump | Alias for create_dump. |
get_dump_status | Alias for get_dump_status. |