pub struct BackupRestorePlan {
pub service_name: String,
pub service_home: PathBuf,
pub repo: String,
pub password: String,
pub env: BTreeMap<String, String>,
pub snapshot: String,
pub online: bool,
pub units: Vec<String>,
pub data_paths: Vec<PathBuf>,
pub include_config: bool,
pub pre_restore_hook: Option<PathBuf>,
pub post_restore_hook: Option<PathBuf>,
}Expand description
Instructions for restoring one installed service from a specific restic snapshot.
Fields§
§service_name: String§service_home: PathBuf§repo: String§password: String§env: BTreeMap<String, String>§snapshot: Stringlatest to grab the newest snapshot, or a specific restic
snapshot id (hex prefix) when the user passed --at <id>.
online: boolMirror of BackupRunPlan::online. A cold restore stops units, wipes
data_paths to a clean tree, restores, then restarts. An online restore
runs only the hooks around restic.
units: Vec<String>The service’s systemd units, derived so ryra can stop the stack before a cold restore. Empty for an online service.
data_paths: Vec<PathBuf>The service’s data directories (absolute), derived from [backup].paths.
A cold restore wipes these to a clean tree before restic restore.
include_config: boolAlso restore the global preferences.toml bundled in the snapshot.
Default false: a per-service restore must NOT clobber global config
(SMTP/auth/backup creds/other services) with a stale copy. true is the
disaster-recovery opt-in (ryra backup restore --config).
pre_restore_hook: Option<PathBuf>§post_restore_hook: Option<PathBuf>Trait Implementations§
Source§impl Clone for BackupRestorePlan
impl Clone for BackupRestorePlan
Source§fn clone(&self) -> BackupRestorePlan
fn clone(&self) -> BackupRestorePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more