pub struct BackupRunPlan {
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 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>§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