Files
home-network-k3s-impl/infra/ansible/playbooks/backup-minio.yml
T
jakman85andClaude Opus 4.8 ac32f01f7b feat(backup): MinIO S3 backup target on Proxmox host for Velero + CNPG
Stand up a single-node/single-drive MinIO S3 endpoint on the Proxmox host as the
off-cluster backup target for Velero (R-STATE-03) and CloudNativePG (R-IDP-05).

Ansible (author + executed):
- roles/minio_backup_target + playbooks/backup-minio.yml — idempotent, additive only:
  ZFS dataset Storage/k3s-backups (zstd, quota=100G, /mnt/Storage/k3s-backups, no
  sharenfs); minio system user; pinned+checksummed MinIO/mc binaries (fetched on the
  controller since the host has no WAN, copied to host); hardened systemd unit bound to
  the host's cluster-reachable LAN IP (auto-discovered) on :9000; velero + cnpg buckets;
  a non-root access key scoped by IAM policy to only those two buckets.
- inventory: new [proxmox_hosts] group ([email protected].2.102); overrides the cluster-wide
  ansible_user. Does not disturb existing k3s node entries.
- group_vars/proxmox_hosts/vault.yml (ansible-vault): root + scoped MinIO creds.

GitOps hand-off:
- platform/backup/minio-credentials.sops.yaml (+ .example) — SOPS/age-encrypted endpoint +
  scoped key/secret for the Velero/CNPG wiring (WS-STORAGE/WS-SEC). Not yet wired into a
  kustomization (left for the consuming agents).

Verified live: dataset props correct; minio active+enabled bound to 192.168.1.9:9000;
S3 endpoint http://192.168.1.9:9000/minio/health/ready returns 200 from an in-cluster pod;
buckets velero+cnpg present; scoped key created+policy attached; re-run is idempotent.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-28 22:15:05 -05:00

21 lines
1.1 KiB
YAML

---
# Stand up the off-cluster S3 backup target (MinIO) on the Proxmox host — the store Velero
# (R-STATE-03) and CloudNativePG (R-IDP-05) back up into. Host infra, additive + idempotent:
# ONE new ZFS dataset (Storage/k3s-backups), the minio user/service/binaries, and the
# velero + cnpg buckets with a scoped non-root access key. It never touches existing
# datasets, sharenfs, pvesm storage, VMs, or firewall.
#
# Credentials come from Ansible vault (inventory/group_vars/proxmox_hosts/vault.yml):
# minio_backup_target_root_user/_root_password, minio_backup_target_access_key/_secret_key
# The scoped key is ALSO staged for the GitOps side (SOPS) at
# platform/backup/minio-credentials.sops.yaml
#
# Prereqs: ansible-galaxy collection install -r collections/requirements.yml (community.general.zfs)
# Run: ansible-playbook playbooks/backup-minio.yml
- name: Provision the MinIO S3 backup target on the Proxmox host
hosts: proxmox_hosts
become: true
gather_facts: true # need ansible_facts.all_ipv4_addresses to discover the LAN bind addr
roles:
- role: minio_backup_target