VeilNet

Backup and Restore

Back up the state store and the secrets directory separately, and restore a guardian onto a new host.

What to Back Up

A guardian has two things to back up:

BackupWhat it holdsWhere to keep it
The state storeTwo databases: the identity service's store, and the guardian's record of every realm, machine, renewal, account change and control action, with its certificate authorities, certificates, PQC inventory and audit records. Every key in it is sealed.In one custody, on a schedule
The secrets directoryThe deployment's whole configuration: the settings, the realm credential, every generated secret, the key that seals the state store, and the internal certificate authority.In a different custody from the state store

Never keep the two backups together. A backup that holds both the state store and the keys that protect it is a single point of compromise.

The metrics store needs no backup. Machines send their telemetry again, so losing it costs history, not state.

Backing Up the State Store

On a schedule, take a compressed full dump of every database in the state store. The deployment guide in the guardian checkout, docs/deployment.md, gives the command in its Backup section.

The dump holds:

  • Every realm and sub-realm, with its delegation and its sealed root key.
  • Every machine, with its sealed secrets and its renewal history.
  • Each admin node's sealed identity.
  • The control record, and the sealed record of where each machine was moved.
  • Every certificate authority, with its key sealed, and every certificate it issued, with the endpoints you watch.
  • The PQC inventory, and the owner of every machine.
  • The audit area: evidence packs and their sealed signing keys, access reviews, test history and audits.
  • The sign-in records the guardian keeps from the identity service.
  • In standalone mode, the operators' accounts and the record of every change to them.

Backing Up the Secrets Directory

Copy the whole secrets/ directory to a different custodian from the one that holds the state store. Everything the stack takes from the host lives there and nowhere else.

If you loseWhat happens
guardian_seal_keyEverything sealed in the state store becomes unreadable: the realm and sub-realm keys, every machine's secrets, the admin nodes' identities, the compartment moves, the certificate authorities' passphrases and the evidence-pack signing keys.
The internal certificate authorityEvery service certificate is issued again. With an internal certificate, operators and machines must trust the new authority.
The identity service's keystore passwordThe identity service's keystore becomes unreadable.
guardian_credentialOnly VeilNet can issue you another.
.envYou lose your settings, and setup starts again from .env.example.

If you have run setup with --force, the directory also holds a <name>.<time>.bak file for each secret or settings file that a run replaced, including the seal key and the certificate authority. Treat them as secrets, as you treat the files they replaced.

Restoring a Guardian

Restore onto a new host that answers on the same address, because every machine renews against the address in its manifest.

0 of 6 done
  1. Check out the guardian on the branch the old host ran, so setup builds on the same conflux channel:

    $ git switch main
  • You can sign in, and the Overview shows the realm credential and the fleet as they were.
  • Protect › Telemetry reads In-band from the … admin node in every realm. The admin nodes come back with the identities they had.

Test a restore on a spare host before you need one.