From 5bc5185ac5994ef1fc95f2ceef02dd3bd96f6e23 Mon Sep 17 00:00:00 2001 From: Quentin de Quelen Date: Tue, 17 Sep 2019 10:35:44 +0200 Subject: [PATCH] feat: re-export rocksdb snapshot function --- meilidb-data/src/database/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meilidb-data/src/database/mod.rs b/meilidb-data/src/database/mod.rs index d5365124f..27525c5c6 100644 --- a/meilidb-data/src/database/mod.rs +++ b/meilidb-data/src/database/mod.rs @@ -121,4 +121,11 @@ impl Database { pub fn common_index(&self) -> Arc { self.common.clone() } + + pub fn checkpoint_to

(&self, path: P) -> Result<(), Error> + where P: AsRef, + { + let checkpoint = rocksdb::checkpoint::Checkpoint::new(&self.inner)?; + Ok(checkpoint.create_checkpoint(path)?) + } }