mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Merge pull request #187 from meilisearch/export-snapshots
Re-export rocksdb snapshot function
This commit is contained in:
commit
5a17b5a63b
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue