feat(backup): implement S1 integrated backup (Q3/D4)

tools/cmd/railiance-backup-s1:
  - OS config snapshot: sshd, ufw, fail2ban, hosts, apt sources
  - installed packages list
  - age-encrypted, output: /opt/backup/railiance/infra/
  - requires root, no network dependency

Makefile: add `make backup` target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-03-10 21:18:05 +01:00
parent 558d2d9677
commit 0433453806
2 changed files with 84 additions and 0 deletions

View file

@ -125,6 +125,10 @@ tf-providers-plan: ## Plan after an upgrade (uses HCLOUD_TOKEN if set)
@terraform -chdir=$(TF_DIR) plan $(if $(TF_TOKEN),-var="hcloud_token=$(TF_TOKEN)")
# ---- Backup (Q3 Operability & Resilience — D4) ----
backup: ## Backup S1 OS config to /opt/backup/railiance/infra/ (age-encrypted, root required)
sudo tools/cmd/railiance-backup-s1
# ---- Ansible ----
ansible-bootstrap: ## Run base bootstrap play (users, ssh, ufw, sops-agent)
cd ansible && ansible-playbook playbooks/bootstrap.yaml -u admin