pub struct SnapshotManager { /* private fields */ }Implementations§
Source§impl SnapshotManager
impl SnapshotManager
pub fn new<P: AsRef<Path>>(snapshot_dir: P) -> Result<Self>
Sourcepub fn create_collection_snapshot(
&self,
data: CollectionSnapshotData,
) -> Result<SnapshotDescription>
pub fn create_collection_snapshot( &self, data: CollectionSnapshotData, ) -> Result<SnapshotDescription>
Create a snapshot for a collection
Sourcepub fn list_collection_snapshots(
&self,
collection_name: &str,
) -> Result<Vec<SnapshotDescription>>
pub fn list_collection_snapshots( &self, collection_name: &str, ) -> Result<Vec<SnapshotDescription>>
List all snapshots for a collection
Sourcepub fn load_collection_snapshot(
&self,
collection_name: &str,
snapshot_name: &str,
) -> Result<CollectionSnapshotData>
pub fn load_collection_snapshot( &self, collection_name: &str, snapshot_name: &str, ) -> Result<CollectionSnapshotData>
Load a snapshot from file
Sourcepub fn delete_collection_snapshot(
&self,
collection_name: &str,
snapshot_name: &str,
) -> Result<bool>
pub fn delete_collection_snapshot( &self, collection_name: &str, snapshot_name: &str, ) -> Result<bool>
Delete a snapshot
Sourcepub fn get_snapshot_path(
&self,
collection_name: &str,
snapshot_name: &str,
) -> Option<PathBuf>
pub fn get_snapshot_path( &self, collection_name: &str, snapshot_name: &str, ) -> Option<PathBuf>
Get snapshot file path for download
Sourcepub async fn download_snapshot_from_url(
&self,
collection_name: &str,
url: &str,
expected_checksum: Option<&str>,
) -> Result<PathBuf>
pub async fn download_snapshot_from_url( &self, collection_name: &str, url: &str, expected_checksum: Option<&str>, ) -> Result<PathBuf>
Download snapshot from URL and save it Supports both vectX and Qdrant snapshot formats
Sourcepub fn load_snapshot_from_path(
&self,
path: &Path,
) -> Result<CollectionSnapshotData>
pub fn load_snapshot_from_path( &self, path: &Path, ) -> Result<CollectionSnapshotData>
Load snapshot from a file path (for recovery) Supports both vectX format (gzipped JSON) and Qdrant format (tar or tar.gz archive)
Sourcepub fn save_uploaded_snapshot(
&self,
collection_name: &str,
data: &[u8],
filename: Option<&str>,
) -> Result<PathBuf>
pub fn save_uploaded_snapshot( &self, collection_name: &str, data: &[u8], filename: Option<&str>, ) -> Result<PathBuf>
Save uploaded snapshot data to a file
Sourcepub fn list_all_snapshots(&self) -> Result<Vec<SnapshotDescription>>
pub fn list_all_snapshots(&self) -> Result<Vec<SnapshotDescription>>
List all snapshots across all collections
Auto Trait Implementations§
impl Freeze for SnapshotManager
impl RefUnwindSafe for SnapshotManager
impl Send for SnapshotManager
impl Sync for SnapshotManager
impl Unpin for SnapshotManager
impl UnwindSafe for SnapshotManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more