pub struct BackupRunPlan {Show 13 fields
pub service_name: String,
pub service_home: PathBuf,
pub repo: String,
pub password: String,
pub env: BTreeMap<String, String>,
pub tags: Vec<String>,
pub paths: Vec<PathBuf>,
pub excludes: Vec<String>,
pub online: bool,
pub units: Vec<String>,
pub data_paths: Vec<PathBuf>,
pub pre_backup_hook: Option<PathBuf>,
pub post_backup_hook: Option<PathBuf>,
}Expand description
Concrete instructions for backing up one installed service.
The CLI consumes this by:
- Running every
pre_backup_hookscript in order. - Spawning
restic backupwithrepo,password(viaRESTIC_PASSWORDenv),envset on the child,--tagfor each string intags, and--excludefor each string inexcludes, withpathsas the positional arguments. - Running every
post_backup_hook(even if step 2 failed — failure-cleanup matters; see [PlanHook::Cleanup]).
Fields§
§service_name: String§service_home: PathBuf§repo: String§password: String§env: BTreeMap<String, String>§paths: Vec<PathBuf>§excludes: Vec<String>§online: boolFalse (the default) means a cold snapshot: ryra stops units, makes
data_paths readable, snapshots, then restarts. True means ryra leaves
the service running and only drives the hooks (see [BackupConfig]).
units: Vec<String>The service’s systemd units (one per container quadlet), derived so ryra can stop the whole stack for a cold snapshot. Empty for an online service.
data_paths: Vec<PathBuf>The service’s data directories (absolute), derived from [backup].paths.
Cold snapshots podman unshare chown these so restic can read them.
pre_backup_hook: Option<PathBuf>§post_backup_hook: Option<PathBuf>Trait Implementations§
Source§impl Clone for BackupRunPlan
impl Clone for BackupRunPlan
Source§fn clone(&self) -> BackupRunPlan
fn clone(&self) -> BackupRunPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BackupRunPlan
impl RefUnwindSafe for BackupRunPlan
impl Send for BackupRunPlan
impl Sync for BackupRunPlan
impl Unpin for BackupRunPlan
impl UnsafeUnpin for BackupRunPlan
impl UnwindSafe for BackupRunPlan
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