You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dumps.rs
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,35 @@
1
+
//! The `dumps` module allows the creation of database dumps.
2
+
//! Dumps are `.dump` files that can be used to launch MeiliSearch.
3
+
//! Dumps are compatible between MeiliSearch versions.
4
+
//!
5
+
//! Creating a dump is also referred to as exporting it, whereas launching MeiliSearch with a dump is referred to as importing it.
6
+
//!
7
+
//! During a [dump export](Client::create_dump), all [indexes](crate::indexes::Index) of the current instance are exported—together with their documents and settings—and saved as a single `.dump` file.
8
+
//!
9
+
//! During a dump import, all indexes contained in the indicated `.dump` file are imported along with their associated [documents](crate::document::Document) and [settings](crate::settings::Settings).
10
+
//! Any existing [index](crate::indexes::Index) with the same uid as an index in the dump file will be overwritten.
11
+
//!
12
+
//! Dump imports are [performed at launch](https://docs.meilisearch.com/reference/features/configuration.html#import-dump) using an option.
13
+
//! [Batch size](https://docs.meilisearch.com/reference/features/configuration.html#dump-batch-size) can also be set at this time.
/// An error occured during dump process, and the task was aborted.
9
28
Failed,
10
29
}
11
30
31
+
/// Limited informations about a dump.\
32
+
/// Can be obtained with [create_dump](Client::create_dump) and [get_dump_status](Client::get_dump_status) methods.
12
33
#[derive(Debug,Deserialize,Clone)]
13
34
#[serde(rename_all = "camelCase")]
14
35
pubstructDumpInfo{
@@ -17,7 +38,12 @@ pub struct DumpInfo {
17
38
puberror:Option<serde_json::Value>,
18
39
}
19
40
41
+
/// Dump related methods.\
42
+
/// See the [dumps](crate::dumps) module.
20
43
impl<'a>Client<'a>{
44
+
/// Triggers a dump creation process.
45
+
/// Once the process is complete, a dump is created in the [dumps directory](https://docs.meilisearch.com/reference/features/configuration.html#dumps-destination).
46
+
/// If the dumps directory does not exist yet, it will be created.
0 commit comments