Expand description
Backup planning. Pure functions that take service install state + the user’s backup config and produce typed plans the CLI executes.
What lives here:
BackupRunPlan: everything the CLI needs to push one service’s data to the configured restic repository.BackupRestorePlan: same shape for the reverse operation.plan_backup_run/plan_backup_restore: the planners.
What does not live here: spawning the restic subprocess, running
hook scripts, or any other side effect. The CLI layer owns those.
Keeping the planner pure means it round-trips cleanly in tests
against a tempdir without needing restic on the test runner.
Structs§
- Backup
Restore Plan - Instructions for restoring one installed service from a specific restic snapshot.
- Backup
RunPlan - Concrete instructions for backing up one installed service.
Functions§
- list_
backup_ enabled - List installed services that have
backup_enabled = truein their metadata. The CLI’sryra backup run(no service argument) uses this to iterate every enabled install. - manifest_
sha256 - Hex SHA256 of the service’s
service.toml. Used as themanifest_sha:tag on each snapshot so a future restore can detect version skew between the snapshot and the currently-installed service definition. - plan_
backup_ restore - Plan a
ryra backup restore <service>invocation. - plan_
backup_ run - Plan a
ryra backup run <service>invocation. Errors loudly when: