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.
Replace a dead node
Section titled “Replace a dead node”In a 3- or 5-node cluster, replacement hardware (or a fresh disk) rejoins under the same node name:
- If the dead node won’t return, remove its
etcdmember so it stops counting toward quorum:Terminal window anastroctl cluster etcd remove-member cp2 --as-operator - Boot the replacement from the installer and read its maintenance ticket from the console.
- Inspect its hardware and update
nodes/cp2.tomlwith the new disk IDs and MAC address:Terminal window anastroctl node inspect <ticket> - Install it:
Terminal window anastroctl cluster apply -n cp2 --maintenance <ticket> - Update
cp2’s entry in your client file with the new endpoint ID thatapplyprinted, 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.
Reset a node
Section titled “Reset a node”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:
anastroctl node reset -n cp2 # dry run: shows what will be erasedanastroctl node reset -n cp2 --yes # erase and reboot into maintenance modeBy 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:
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 |
Manage etcd members
Section titled “Manage etcd members”anastroctl cluster etcd members --as-operatoranastroctl cluster etcd remove-member <name> --as-operatorremove-member refuses while that member’s etcd still responds. Any node returning with empty
etcd data rejoins automatically.
Lose every node
Section titled “Lose every node”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.
- Install each replacement node with
anastroctl cluster apply -n <node> --maintenance <ticket>, keeping[backup] enabled = trueand the originalbackup.storeinanastro.toml. (If you also lost your old operator key, put a new one incluster.operator_keysbefore installing—each fresh node trusts the key in its initial config.) - Update your client file with the new node endpoint IDs.
- Bootstrap and restore:
Terminal window anastroctl cluster bootstrap --restore-from backupsanastroctl 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.
A locked-out admin
Section titled “A locked-out admin”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:
anastroctl cluster recover # recover the first adminanastroctl 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>.
How Anastro handles failures
Section titled “How Anastro handles failures”| 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 |