mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-25 06:00:08 +01:00
Merge pull request #187 from meilisearch/export-snapshots
Re-export rocksdb snapshot function
This commit is contained in:
commit
5a17b5a63b
@ -121,4 +121,11 @@ impl Database {
|
|||||||
pub fn common_index(&self) -> Arc<CommonIndex> {
|
pub fn common_index(&self) -> Arc<CommonIndex> {
|
||||||
self.common.clone()
|
self.common.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn checkpoint_to<P>(&self, path: P) -> Result<(), Error>
|
||||||
|
where P: AsRef<Path>,
|
||||||
|
{
|
||||||
|
let checkpoint = rocksdb::checkpoint::Checkpoint::new(&self.inner)?;
|
||||||
|
Ok(checkpoint.create_checkpoint(path)?)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user