pub struct BackupConfig { /* private fields */ }Expand description
Backup configuration for a deployed tracker instance.
Specifies when backups run (cron schedule) and how long to keep them (retention).
Implementations§
Source§impl BackupConfig
impl BackupConfig
Sourcepub const fn new(schedule: CronSchedule, retention_days: RetentionDays) -> Self
pub const fn new(schedule: CronSchedule, retention_days: RetentionDays) -> Self
Creates a new backup configuration.
§Arguments
schedule- Validated cron scheduleretention_days- Number of days to keep backups
Sourcepub const fn schedule(&self) -> &CronSchedule
pub const fn schedule(&self) -> &CronSchedule
Returns the cron schedule.
Sourcepub const fn retention_days(&self) -> &RetentionDays
pub const fn retention_days(&self) -> &RetentionDays
Returns the retention period in days.
Trait Implementations§
Source§impl Clone for BackupConfig
impl Clone for BackupConfig
Source§fn clone(&self) -> BackupConfig
fn clone(&self) -> BackupConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackupConfig
impl Debug for BackupConfig
Source§impl Default for BackupConfig
impl Default for BackupConfig
Source§impl DependencyDerivation for BackupConfig
impl DependencyDerivation for BackupConfig
Source§fn derive_dependencies(
&self,
enabled_services: &EnabledServices,
) -> Vec<ServiceDependency>
fn derive_dependencies( &self, enabled_services: &EnabledServices, ) -> Vec<ServiceDependency>
Backup depends on MySQL service being healthy when MySQL is enabled
When MySQL is the database driver, the backup must wait for MySQL
to be ready before attempting database dumps.
For SQLite, no external dependencies are needed.
Source§impl<'de> Deserialize<'de> for BackupConfig
impl<'de> Deserialize<'de> for BackupConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl NetworkDerivation for BackupConfig
impl NetworkDerivation for BackupConfig
Source§fn derive_networks(&self, enabled_services: &EnabledServices) -> Vec<Network>
fn derive_networks(&self, enabled_services: &EnabledServices) -> Vec<Network>
Backup connects to Database network when MySQL is enabled
When MySQL is the database driver, the backup container needs access
to the database network to connect to MySQL for database dumps.
For SQLite, no network access is needed (file access via volume).
Source§impl PartialEq for BackupConfig
impl PartialEq for BackupConfig
Source§impl PortDerivation for BackupConfig
impl PortDerivation for BackupConfig
Source§fn derive_ports(&self) -> Vec<PortBinding>
fn derive_ports(&self) -> Vec<PortBinding>
Backup service exposes no ports
The backup container runs as a one-shot service and doesn’t listen on any network ports.
Source§impl Serialize for BackupConfig
impl Serialize for BackupConfig
Source§impl TryFrom<BackupSection> for BackupConfig
impl TryFrom<BackupSection> for BackupConfig
Source§type Error = CreateConfigError
type Error = CreateConfigError
impl Eq for BackupConfig
impl StructuralPartialEq for BackupConfig
Auto Trait Implementations§
impl Freeze for BackupConfig
impl RefUnwindSafe for BackupConfig
impl Send for BackupConfig
impl Sync for BackupConfig
impl Unpin for BackupConfig
impl UnsafeUnpin for BackupConfig
impl UnwindSafe for BackupConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request