pez-infra/ansible/inventory/host_vars/copenhagen-a.yml
Rasmus "Pez" Wejlgaard 0a552b10da Back up the Proxmox VMs to london-b
Neither Proxmox host had a single backup job, so the game servers, the
k3s control planes and the workspace VMs had no backups at all.

copenhagen-a has nowhere local to keep them (`local` is the root LV and
already 82% full), so both hosts now back up to a new pve-backups Samba
share on london-b, each into its own directory. VMIDs overlap between
the two hosts, and retention prunes by VMID, so they can't share one.

- media_stack creates a Samba-only pvebackup user on london-b, the share
  and the per-host directories. The password comes from SOPS and gets
  re-set if the login stops working. smb.conf is now checked with
  testparm before it's deployed.
- proxmox_ve adds a backup-only london-b-backups CIFS storage, pushes the
  credentials again if the storage goes inactive, and fails the deploy
  if it still can't reach london-b.
- Jobs are defined in host_vars. Each job keeps a hash of its settings
  in its comment, so the role only touches jobs that changed and removes
  ones I delete from host_vars. Jobs made by hand are left alone.

london-a backs up the control plane every night. copenhagen-a backs up
the control plane and game servers every night and the workspace VMs
weekly, since every run is a full archive going over the WAN.
2026-09-16 17:52:22 +01:00

22 lines
761 B
YAML

---
host_role: proxmox-ve
host_description: "Proxmox VE hypervisor"
host_location: "Copenhagen"
ansible_python_interpreter: /usr/bin/python3
# Don't mount london-b's CIFS share here — it's on the London LAN, not worth
# the WAN/Tailscale hop for VM storage from Copenhagen.
proxmox_ve_mount_cifs_storage: false
# Backups cross the WAN to london-b, and every run is a full archive, so only
# the VMs whose data changes daily (the game servers and the k3s control plane)
# run nightly. The workspace VMs are backed up weekly.
proxmox_ve_backup_jobs:
- id: daily
schedule: "03:00"
vmids: [100, 102, 103]
prune_backups: "keep-daily=7,keep-weekly=4"
- id: weekly
schedule: "sun 04:30"
vmids: [101, 104]
prune_backups: "keep-weekly=4"