diff --git a/meilisearch-http/src/dump.rs b/meilisearch-http/src/dump.rs index 50d89bdc2..468dbf640 100644 --- a/meilisearch-http/src/dump.rs +++ b/meilisearch-http/src/dump.rs @@ -245,7 +245,7 @@ fn generate_uid() -> String { /// Infer dumps_dir from dump_uid pub fn compressed_dumps_dir(dumps_dir: &Path, dump_uid: &str) -> PathBuf { - dumps_dir.join(format!("{}.tar.gz", dump_uid)) + dumps_dir.join(format!("{}.dump", dump_uid)) } /// Write metadata in dump @@ -380,7 +380,7 @@ fn dump_process(data: web::Data, dumps_dir: PathBuf, dump_info: DumpInfo) } } - // compress dump in a file named `{dump_uid}.tar.gz` in `dumps_dir` + // compress dump in a file named `{dump_uid}.dump` in `dumps_dir` if let Err(e) = crate::helpers::compression::to_tar_gz(&tmp_dir_path, &compressed_dumps_dir(&dumps_dir, &dump_info.uid)) { fail_dump_process(dump_info, "compressing dump", e); return ; diff --git a/meilisearch-http/src/snapshot.rs b/meilisearch-http/src/snapshot.rs index c391dbdfa..980d491d0 100644 --- a/meilisearch-http/src/snapshot.rs +++ b/meilisearch-http/src/snapshot.rs @@ -42,7 +42,7 @@ pub fn schedule_snapshot(data: Data, snapshot_dir: &Path, time_gap_s: u64) -> Re } let db_name = Path::new(&data.db_path).file_name().ok_or_else(|| Error::Internal("invalid database name".to_string()))?; create_dir_all(snapshot_dir)?; - let snapshot_path = snapshot_dir.join(format!("{}.tar.gz", db_name.to_str().unwrap_or("data.ms"))); + let snapshot_path = snapshot_dir.join(format!("{}.snapshot", db_name.to_str().unwrap_or("data.ms"))); thread::spawn(move || loop { thread::sleep(Duration::from_secs(time_gap_s)); @@ -67,7 +67,7 @@ mod tests { let test_dir = tempdir.path(); let src_dir = test_dir.join("src"); let dest_dir = test_dir.join("complex/destination/path/"); - let archive_path = test_dir.join("archive.tar.gz"); + let archive_path = test_dir.join("archive.snapshot"); let file_1_relative = Path::new("file1.txt"); let subdir_relative = Path::new("subdir/");