Skip to main content

Module backup

Module backup 

Source
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 value line out of the manifest.
restorable
Whether the whole backup is restorable.
verify
Checks one backup directory.