mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
feat(auth): Extend API keys
- Add API keys in snapshots - Add API keys in dumps - Rename action indexes.add to indexes.create - fix QA #1979 fix #1979 fix #1995 fix #2001 fix #2003 related to #1890
This commit is contained in:
parent
8096b568f0
commit
ee7970f603
19 changed files with 418 additions and 204 deletions
|
@ -107,6 +107,7 @@ impl SnapshotJob {
|
|||
self.snapshot_meta_env(temp_snapshot_path)?;
|
||||
self.snapshot_file_store(temp_snapshot_path)?;
|
||||
self.snapshot_indexes(temp_snapshot_path)?;
|
||||
self.snapshot_auth(temp_snapshot_path)?;
|
||||
|
||||
let db_name = self
|
||||
.src_path
|
||||
|
@ -190,4 +191,18 @@ impl SnapshotJob {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn snapshot_auth(&self, path: &Path) -> anyhow::Result<()> {
|
||||
let auth_path = self.src_path.join("auth");
|
||||
let dst = path.join("auth");
|
||||
std::fs::create_dir_all(&dst)?;
|
||||
let dst = dst.join("data.mdb");
|
||||
|
||||
let mut options = heed::EnvOpenOptions::new();
|
||||
options.map_size(1_073_741_824);
|
||||
let env = options.open(auth_path)?;
|
||||
env.copy_to_path(dst, heed::CompactionOption::Enabled)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue