diff --git a/pbs-datastore/src/lib.rs b/pbs-datastore/src/lib.rs index fcc368ff..d50a64a5 100644 --- a/pbs-datastore/src/lib.rs +++ b/pbs-datastore/src/lib.rs @@ -201,3 +201,6 @@ pub use datastore::{check_backup_owner, DataStore}; mod snapshot_reader; pub use snapshot_reader::SnapshotReader; + +mod local_chunk_reader; +pub use local_chunk_reader::LocalChunkReader; diff --git a/src/backup/read_chunk.rs b/pbs-datastore/src/local_chunk_reader.rs similarity index 95% rename from src/backup/read_chunk.rs rename to pbs-datastore/src/local_chunk_reader.rs index 028db311..0f818c03 100644 --- a/src/backup/read_chunk.rs +++ b/pbs-datastore/src/local_chunk_reader.rs @@ -6,9 +6,10 @@ use anyhow::{bail, Error}; use pbs_tools::crypt_config::CryptConfig; use pbs_api_types::CryptMode; -use pbs_datastore::data_blob::DataBlob; -use pbs_datastore::read_chunk::{ReadChunk, AsyncReadChunk}; -use pbs_datastore::DataStore; + +use crate::data_blob::DataBlob; +use crate::read_chunk::{ReadChunk, AsyncReadChunk}; +use crate::DataStore; #[derive(Clone)] pub struct LocalChunkReader { diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 77e24513..97b5b7fa 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -39,7 +39,10 @@ use pbs_api_types::{ Authid, BackupContent, Counts, CryptMode, }; use pbs_client::pxar::create_zip; -use pbs_datastore::{check_backup_owner, DataStore, BackupDir, BackupGroup, StoreProgress, CATALOG_NAME}; +use pbs_datastore::{ + check_backup_owner, DataStore, BackupDir, BackupGroup, StoreProgress, LocalChunkReader, + CATALOG_NAME, +}; use pbs_datastore::backup_info::BackupInfo; use pbs_datastore::cached_chunk_reader::CachedChunkReader; use pbs_datastore::catalog::{ArchiveEntry, CatalogReader}; @@ -60,7 +63,6 @@ use proxmox_rest_server::{WorkerTask, formatter}; use crate::api2::node::rrd::create_value_from_rrd; use crate::backup::{ verify_all_backups, verify_backup_group, verify_backup_dir, verify_filter, - LocalChunkReader, }; use crate::server::jobstate::Job; diff --git a/src/backup/mod.rs b/src/backup/mod.rs index 59078c1d..ca060c9f 100644 --- a/src/backup/mod.rs +++ b/src/backup/mod.rs @@ -3,9 +3,5 @@ // Note: .pcat1 => Proxmox Catalog Format version 1 pub const CATALOG_NAME: &str = "catalog.pcat1.didx"; -// Split -mod read_chunk; -pub use read_chunk::*; - mod verify; pub use verify::*;