No backup: agent state exists only on this box #13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The ai-coding-box has no backup of any kind. Everything durable lives on a single disk:
/home/agent-pi/.pi— agent memory, skills, session history (~201 MB, irreplaceable)/home/agent-pi/.ssh— the forge.marvin8.zone signing key (irreplaceable; losing it bricks the agent identity)/etc/tailscale/authkey— boot-critical enrollment secretA disk failure loses the agent identity and all accumulated memory. The NixOS config itself is safe (it lives in this repo), and the wip repos are pushed to the forge, but none of the above is anywhere else.
What is needed: an unattended, encrypted, off-box nightly backup that requires no manual attention, with monitoring so a silent failure is visible.
Findings from exploring the box/repo
restic0.18.1 is already installed (inenvironment.systemPackages) but noservices.restic.backups.*is configured.services.restic.backups.<name>) defaults to running the backup as root (user = "root"), so acap_dac_read_searchsecurity wrapper is unnecessary to read~/.sshand/etc/tailscale/authkey. The module also offerscreateWrapperwhich installs arestic-<name>CLI with the repository env baked in, for manual snapshots/inspection.~/.pi201M,~/wip219M (already on the forge — excluded), podman storage 2.8G and uv/nix caches ~0.4G (all re-downloadable — excluded). Real backup target ≈ 202 MB.uptime.11c8.cloudresolves publicly and is reachable from the box (verified bydig+curl), so an Uptime Kuma push monitor works from here.Plan of attack
services.restic.backups.nightlytohosts/ai-coding-box/default.nix:s3:https://s3.ap-southeast-2.wasabisys.com/ai-coding-box-backup-au(new dedicated Wasabi bucket, ap-southeast-2),initialize = truecreateWrapper = true,runCheck = true/etc/tailscale/authkey,/home/agent-pi/.pi,/home/agent-pi/.ssh,/home/agent-pi/.config,/home/agent-pi/.local/share/fish,/home/agent-pi/.local/share/zoxide,/home/agent-pi/devbox.json--keep-daily 7 --group-by ''(matches the VPS; longer history is handled by the secondary backup)OnCalendar = "*-*-* 02:00:00"(local, box TZ is Australia/Brisbane),Persistent = true,RandomizedDelaySec = "10min"onSuccessandonFailureunits push to Uptime Kuma (status=up/status=down); the push URL is read at runtime from/etc/restic/kuma-push.url(0600) so the token never lands in the repo or the world-readable Nix store./etc/restic/password,/etc/restic/wasabi.env(AWS key pair),/etc/restic/kuma-push.url. SETUP.md gains the provisioning steps + first-run verification.hosts/ai-coding-box/default.nix,SETUP.md.nix flake checkand a local build of the host toplevel. No live-system change until after merge (nixos-rebuild switch, secrets placed, one manualsystemctl start restic-backups-nightly, confirm Kuma ping).