Skip to content

Recovery

Runbooks for replacing hardware, resetting nodes, disaster recovery from backups, and recovering admin access—plus a quick reference of how Anastro handles failures automatically.

In a 3- or 5-node cluster, replacement hardware (or a fresh disk) rejoins under the same node name:

  1. If the dead node won’t return, remove its etcd member so it stops counting toward quorum:
    Terminal window
    anastroctl cluster etcd remove-member cp2 --as-operator
  2. Boot the replacement from the installer and read its maintenance ticket from the console.
  3. Inspect its hardware and update nodes/cp2.toml with the new disk IDs and MAC address:
    Terminal window
    anastroctl node inspect <ticket>
  4. Install it:
    Terminal window
    anastroctl cluster apply -n cp2 --maintenance <ticket>
  5. Update cp2’s entry in your client file with the new endpoint ID that apply printed, then apply the cluster so peers learn the new ID:
    Terminal window
    anastroctl cluster apply

The replacement unseals automatically from its peers, rejoins etcd, and clones Postgres from the primary. Watch progress with anastroctl node status --as-operator.

On a single-node cluster, reinstall and restore from backups instead.

node reset drains a node’s machines, wipes its cluster state (config, secrets, etcd, Patroni, Postgres, apid state, and local object stores), and reboots it into maintenance mode:

Terminal window
anastroctl node reset -n cp2 # dry run: shows what will be erased
anastroctl node reset -n cp2 --yes # erase and reboot into maintenance mode

By default, the node keeps its keypair (same endpoint ID) and ignores any attached ANASTROCFG disk until a config arrives over the network. Bring it back with:

Terminal window
anastroctl cluster apply -n cp2 --maintenance <ticket>
anastroctl cluster host uncordon cp2 --as-operator # if it's a worker
Flag Effect
--yes Actually perform the reset (omitting it is a dry run)
--full Also wipe /var’s LUKS key and the node’s keypair (boots with a brand-new endpoint ID)
--force Proceed even if etcd would lose quorum or the Postgres primary can’t hand off
--allow-stop Stop machines that can’t live-move instead of blocking the drain
Terminal window
anastroctl cluster etcd members --as-operator
anastroctl cluster etcd remove-member <name> --as-operator

remove-member refuses while that member’s etcd still responds. Any node returning with empty etcd data rejoins automatically.

To rebuild an entire cluster from backups, you need your config repo, secrets.age plus an age private key, an operator key, and access to the backups bucket.

  1. Install each replacement node with anastroctl cluster apply -n <node> --maintenance <ticket>, keeping [backup] enabled = true and the original backup.store in anastro.toml. (If you also lost your old operator key, put a new one in cluster.operator_keys before installing—each fresh node trusts the key in its initial config.)
  2. Update your client file with the new node endpoint IDs.
  3. Bootstrap and restore:
    Terminal window
    anastroctl cluster bootstrap --restore-from backups
    anastroctl cluster bootstrap --restore-from backups --target-time 2026-11-02T13:55:00Z -n cp1

bootstrap brings up an empty cluster, verifies the store contains valid backups, restores them on -n <node> (defaulting to the first node in your client file), clones the other control-plane nodes from it, updates any worker-only nodes in your client file, and takes a fresh base backup. Data loss is bounded to whatever WAL hadn’t shipped yet—typically around a minute.

If a cluster admin loses every enrolled device, enroll a new one from any computer holding secrets.age, a matching age identity, and the client file:

Terminal window
anastroctl cluster recover # recover the first admin
anastroctl cluster recover --user <admin>

anastroctl connects over iroh using the bundle’s auth/recovery_key (which nodes never hold the private half of) and enrolls the current computer as that admin. For non-admin users, a cluster admin issues a recovery link with anastroctl org member recover <user>.

Failure What happens automatically Data lost
Replica node dies Cluster keeps running None
Postgres primary dies Patroni fails over to a replica; clients reconnect None
2 of 3 control-plane nodes die etcd loses quorum; Postgres pauses writes until a node returns None
Bad OS upgrade Node rolls back to previous slot after 3 failed boots; rollout stops None
TPM won’t unlock /var (hardware/firmware/dbx change) Node can’t boot data; reinstall and let it rejoin None in HA; restore single node
Backups bucket unreachable WAL buffers on disk; WalArchiveStalled fires after 5 min None unless disk fills
Runaway workload on a converged node Capped by workloads.slice None
hostagent restarts Running microVMs keep going and are re-adopted None
Worker loses contact with control plane Running machines continue; exited ones restart None
Workspaces store unreachable Machines keep working; checkpoints queue locally None while host survives
keyd is down Already-mounted workspaces keep running; new mounts/moves fail; KeyProviderUnavailable fires None
Agents sidecar crashes on a node Another control-plane node picks up its threads None
Every node is destroyed Rebuild from backups ~1 minute of unarchived WAL

Observability.