pub struct BackupLayout { /* private fields */ }Expand description
BackupLayout
Canonical filesystem layout for one backup directory. Owned by persistence and used by backup runner and restore verification paths.
Implementations§
Source§impl BackupLayout
impl BackupLayout
Sourcepub const fn new(root: PathBuf) -> Self
pub const fn new(root: PathBuf) -> Self
Create a filesystem layout rooted at one backup directory.
Sourcepub fn manifest_path(&self) -> PathBuf
pub fn manifest_path(&self) -> PathBuf
Return the canonical manifest path for this backup layout.
Sourcepub fn backup_plan_path(&self) -> PathBuf
pub fn backup_plan_path(&self) -> PathBuf
Return the canonical backup plan path for this layout.
Sourcepub fn journal_path(&self) -> PathBuf
pub fn journal_path(&self) -> PathBuf
Return the canonical mutable journal path for this backup layout.
Sourcepub fn execution_journal_path(&self) -> PathBuf
pub fn execution_journal_path(&self) -> PathBuf
Return the canonical backup execution journal path for this layout.
Sourcepub fn write_manifest(
&self,
manifest: &DeploymentBackupManifest,
) -> Result<(), PersistenceError>
pub fn write_manifest( &self, manifest: &DeploymentBackupManifest, ) -> Result<(), PersistenceError>
Write a validated manifest with atomic replace semantics.
Sourcepub fn read_manifest(
&self,
) -> Result<DeploymentBackupManifest, PersistenceError>
pub fn read_manifest( &self, ) -> Result<DeploymentBackupManifest, PersistenceError>
Read and validate a manifest from this backup layout.
Sourcepub fn write_backup_plan(
&self,
plan: &BackupPlan,
) -> Result<(), PersistenceError>
pub fn write_backup_plan( &self, plan: &BackupPlan, ) -> Result<(), PersistenceError>
Write a validated backup plan with atomic replace semantics.
Sourcepub fn read_backup_plan(&self) -> Result<BackupPlan, PersistenceError>
pub fn read_backup_plan(&self) -> Result<BackupPlan, PersistenceError>
Read and validate a backup plan from this layout.
Sourcepub fn write_journal(
&self,
journal: &DownloadJournal,
) -> Result<(), PersistenceError>
pub fn write_journal( &self, journal: &DownloadJournal, ) -> Result<(), PersistenceError>
Write a validated download journal with atomic replace semantics.
Sourcepub fn read_journal(&self) -> Result<DownloadJournal, PersistenceError>
pub fn read_journal(&self) -> Result<DownloadJournal, PersistenceError>
Read and validate a download journal from this backup layout.
Sourcepub fn write_execution_journal(
&self,
journal: &BackupExecutionJournal,
) -> Result<(), PersistenceError>
pub fn write_execution_journal( &self, journal: &BackupExecutionJournal, ) -> Result<(), PersistenceError>
Write a validated backup execution journal with atomic replace semantics.
Sourcepub fn read_execution_journal(
&self,
) -> Result<BackupExecutionJournal, PersistenceError>
pub fn read_execution_journal( &self, ) -> Result<BackupExecutionJournal, PersistenceError>
Read and validate a backup execution journal from this layout.
Sourcepub fn verify_integrity(
&self,
) -> Result<BackupIntegrityReport, PersistenceError>
pub fn verify_integrity( &self, ) -> Result<BackupIntegrityReport, PersistenceError>
Validate the manifest, journal, and durable artifact checksums.
Sourcepub fn verify_execution_integrity(
&self,
) -> Result<BackupExecutionIntegrityReport, PersistenceError>
pub fn verify_execution_integrity( &self, ) -> Result<BackupExecutionIntegrityReport, PersistenceError>
Validate the persisted backup plan and execution journal agree.
Trait Implementations§
Source§impl Clone for BackupLayout
impl Clone for BackupLayout
Source§fn clone(&self) -> BackupLayout
fn clone(&self) -> BackupLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more