Expand description
choir backup verify — is this copy restorable?
The mirror leg reports that it wrote a backup. This is the only thing that reports the backup can be restored from, which is a different claim and the one that matters on the day it is needed.
Every check is local. It opens no connection, reads nothing from the node, and does not care which machine it is run on — a backup you can only verify by asking the thing it is a backup of is not a backup.
§Why this is not the shell script it replaces
docs/runbook-restore.md told a reader to run ./choirctl verify-backup, and the release ships choir and choir-node and
nothing else. The restore runbook — the page reached for on the worst
day — named a command that was not in the tarball.
§Examples
use choir_cli::backup::REQUIRED_POLICY;
// A backup without these cannot start the node it came from.
assert!(REQUIRED_POLICY.contains(&"keys"));
assert!(REQUIRED_POLICY.contains(&"repos.list"));Constants§
- OPTIONAL_
POLICY - Policy files a node may or may not have been started with.
- REQUIRED_
FILES - The four files every backup has, and cannot be restored without.
- REQUIRED_
POLICY - Policy files a restored node cannot start without.
Functions§
- is_
secret - Names that must never be inside a backup.
- manifest_
value - One
key valueline out of the manifest. - restorable
- Whether the whole backup is restorable.
- verify
- Checks one backup directory.