cleanup proxmox_backup::backup module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2021-08-30 11:49:22 +02:00
parent 97dfc62f0d
commit b2065dc7d2
33 changed files with 128 additions and 175 deletions

View File

@ -27,13 +27,12 @@ use proxmox::{
sys::error::SysResult,
};
use pbs_api_types::Fingerprint;
use pbs_datastore::key_derivation::KeyConfig;
use crate::{
config,
tools::run_command,
backup::{
Fingerprint,
KeyConfig,
},
api2::types::{
MamAttribute,
LtoDriveAndMediaStatus,

View File

@ -28,14 +28,12 @@ use proxmox::{
api::section_config::SectionConfigData,
};
use pbs_datastore::task_log;
use pbs_api_types::Fingerprint;
use pbs_datastore::key_derivation::KeyConfig;
use pbs_datastore::task::TaskState;
use pbs_datastore::task_log;
use crate::{
backup::{
Fingerprint,
KeyConfig,
},
api2::types::{
VirtualTapeDrive,
LtoTapeDrive,

View File

@ -10,8 +10,9 @@ use proxmox::tools::{
fs::{replace_file, CreateOptions},
};
use pbs_datastore::key_derivation::KeyConfig;
use crate::{
backup::KeyConfig,
tape::{
TapeWrite,
TapeRead,

View File

@ -8,7 +8,7 @@ use proxmox::tools::{
io::ReadExt,
};
use crate::backup::DataBlob;
use pbs_datastore::DataBlob;
use crate::tape::{
TapeWrite,

View File

@ -1,6 +1,17 @@
//! File format definitions and implementations for data written to
//! tapes
use std::collections::HashMap;
use anyhow::{bail, Error};
use bitflags::bitflags;
use endian_trait::Endian;
use serde::{Deserialize, Serialize};
use proxmox::tools::Uuid;
use pbs_api_types::Fingerprint;
mod blocked_reader;
pub use blocked_reader::*;
@ -22,17 +33,6 @@ pub use multi_volume_writer::*;
mod multi_volume_reader;
pub use multi_volume_reader::*;
use std::collections::HashMap;
use anyhow::{bail, Error};
use ::serde::{Deserialize, Serialize};
use endian_trait::Endian;
use bitflags::bitflags;
use proxmox::tools::Uuid;
use crate::backup::Fingerprint;
/// We use 256KB blocksize (always)
pub const PROXMOX_TAPE_BLOCK_SIZE: usize = 256*1024;

View File

@ -6,21 +6,14 @@ use std::fs::File;
use anyhow::{bail, Error};
use nix::dir::Dir;
use pbs_datastore::backup_info::BackupDir;
use pbs_datastore::index::IndexFile;
use pbs_datastore::fixed_index::FixedIndexReader;
use pbs_datastore::dynamic_index::DynamicIndexReader;
use pbs_datastore::manifest::{archive_type, ArchiveType, CLIENT_LOG_BLOB_NAME, MANIFEST_BLOB_NAME};
use pbs_tools::fs::lock_dir_noblock_shared;
use crate::{
backup::{
DataStore,
BackupDir,
ArchiveType,
IndexFile,
FixedIndexReader,
DynamicIndexReader,
MANIFEST_BLOB_NAME,
CLIENT_LOG_BLOB_NAME,
archive_type,
},
};
use crate::backup::DataStore;
/// Helper to access the contents of a datastore backup snapshot
///

View File

@ -9,6 +9,7 @@ use anyhow::{bail, format_err, Error};
use endian_trait::Endian;
use pbs_tools::fs::read_subdir;
use pbs_datastore::backup_info::BackupDir;
use proxmox::tools::{
Uuid,
@ -24,7 +25,6 @@ use proxmox::tools::{
};
use crate::{
backup::BackupDir,
tape::{
MediaId,
file_formats::MediaSetLabel,

View File

@ -10,12 +10,14 @@
use std::path::{PathBuf, Path};
use anyhow::{bail, Error};
use ::serde::{Deserialize, Serialize};
use serde::{Deserialize, Serialize};
use proxmox::tools::Uuid;
use pbs_api_types::Fingerprint;
use crate::{
backup::{Fingerprint, BackupLockGuard},
backup::BackupLockGuard,
api2::types::{
MediaStatus,
MediaLocation,

View File

@ -3,15 +3,13 @@ use std::sync::{Arc, Mutex};
use anyhow::{format_err, Error};
use pbs_datastore::DataBlob;
use crate::{
backup::{
DataStore,
DataBlob,
},
backup::DataStore,
tape::{
CatalogSet,
SnapshotReader,
},
};