mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08: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> {
|
||||
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…
Reference in New Issue
Block a user