fn parse_backup(backup: &[u8], password: Option<&str>) -> Result<ServerConfig>Expand description
Parse a guardian backup tar into a ServerConfig entirely in memory.
Validates archive paths and rejects missing, unexpected, duplicate, or
non-file entries. Two backup formats are supported: the current plaintext
format (containing private.json) and the legacy encrypted format
(containing private.encrypt + private.salt), which requires the guardian
password used when the backup was created. Nothing is written to disk; the
caller writes the validated config into the data directory just like a
freshly generated config.