resticprofile schedule copies env-file values into the generated units, which
are 0644, so RESTIC_REPOSITORY (the rest-server basic-auth password included)
was readable by every local user on every restic host.
New playbooks/restic-repository-file.yaml:
- derives /etc/restic/repository (root 0400) from restic.env;
- uploads the profile switched to repository-file, but only when the live
profile's sha matches the repo copy it was edited from (drift guard);
- checks the repository is reachable through the new profile (cat config);
- regenerates the units and verifies they exist and contain no rest:http.
Applied to ana-docker, fv-ml1 (configs/restic/ana-ml2), esh-docker-vm,
esh-vm-db, irv-ml1, nh3-dev and nh3-docker. An independent check across all
eight restic hosts (these seven plus esh-ml1) found 0 leaking units. nh3-docker's
scheduled unit ran a real backup afterwards (snapshot a29b889d). Each host's
URL and passphrase are vaulted as <host>/etc/restic/{repository,password}.
restic.env is kept (root 0600) because the per-host READMEs and the freshness
probe source it. A rotation must update the vault, restic.env and repository.
vm-esh-nas has no infra-ops account. Its in-place migration script is staged
for Prime to run with sudo, and its repo profile is pre-edited to match.
Also mirrors augaman-dev's 401df2d (compose header only). The config hash on
esh-ml1 is unchanged.
94 lines
3.6 KiB
YAML
94 lines
3.6 KiB
YAML
# resticprofile config for ana-ml2.
|
|
#
|
|
# **Bare metal** — not protected by any Proxmox vzdump. This is the only
|
|
# backup for this host's config/state, so it's the highest-stakes repo in
|
|
# the fleet. Writes to the Anaheim rest-server at 10.250.50.70 as user
|
|
# `ana-ml2`. The full REST URL (with HTTP basic auth creds) lives in
|
|
# /etc/restic/repository (root 0400). The client-side encryption passphrase lives in
|
|
# /etc/restic/password.
|
|
#
|
|
# Notable exclusions:
|
|
# - /tank/* is NOT in source paths. That's ~TB of model weights (HF
|
|
# caches, llama.cpp GGUFs, ComfyUI models, etc.) — all regenerable
|
|
# from upstream. Backing them up would blow the repo size budget.
|
|
# ONE carve-out: /tank/erp-tune/run-*/adapter. A trained LoRA adapter is
|
|
# the only thing under /tank that upstream cannot hand back — each is
|
|
# ~300 MB and cost 7-14 h of GPU time, and the ERP line's adapters exist
|
|
# nowhere else but pfi-gx10's single NVMe and here. ~2.4 GB total.
|
|
# - No DB dumps needed. None of the stacks on this host (llama-swap,
|
|
# vllm-qwen3, comfyui, kokoro, parakeet, vibevoice, beszel-agent,
|
|
# dozzle-agent, dockge) store relational data.
|
|
|
|
version: "1"
|
|
|
|
global:
|
|
priority: low
|
|
ionice: true
|
|
ionice-class: 2
|
|
ionice-level: 7
|
|
min-memory: 100
|
|
|
|
default:
|
|
repository-file: /etc/restic/repository # URL incl. rest-server creds (root 0400).
|
|
# NOT env-file: `resticprofile schedule` copies env-file values into the
|
|
# world-readable systemd units (docs/runbooks/backups.md, Known gaps).
|
|
env:
|
|
RESTIC_PASSWORD_FILE: /etc/restic/password
|
|
initialize: false # repo created manually by `restic init`
|
|
lock: /var/lock/restic-ana-ml2.lock
|
|
|
|
backup:
|
|
verbose: 1
|
|
run-after:
|
|
- date +%s > /var/lib/restic/last-success
|
|
source:
|
|
- /opt/docker # compose files + host-level configs — small (~100MB)
|
|
- /etc # host config (systemd units, chrony, apparmor, ssh, etc.)
|
|
- /root # root shell history, ssh keys, any ad-hoc scripts
|
|
- /var/lib/docker/volumes # named volumes (small; models live on /tank, not here)
|
|
- /tank/erp-tune/run-*/adapter # non-regenerable trained LoRA adapters (see header)
|
|
exclude:
|
|
# Docker internals we never want in a backup
|
|
- /var/lib/docker/volumes/backingFsBlockDev
|
|
- /var/lib/docker/volumes/metadata.db
|
|
# Parakeet's HF model cache — named volume (stacks that bind-mount
|
|
# from /tank/ are already outside the source list; parakeet is the
|
|
# odd one out using a docker volume). Regenerable from Hugging Face.
|
|
- /var/lib/docker/volumes/parakeet_parakeet_cache
|
|
# Ephemeral / regenerable junk
|
|
- /opt/docker/compose/*/logs
|
|
- "**/*.log"
|
|
- "**/*.log.*"
|
|
- "**/*.pid"
|
|
# Root's noise — shell caches, tmp
|
|
- /root/.cache
|
|
- /root/.local/share/Trash
|
|
- /root/.npm
|
|
- /root/.python_history
|
|
tag:
|
|
- host:ana-ml2
|
|
- site:ana
|
|
- fleet:pfi
|
|
schedule: "*-*-* 01:00:00"
|
|
schedule-permission: system
|
|
schedule-log: /var/log/restic-backup.log
|
|
|
|
forget:
|
|
keep-daily: 7
|
|
keep-weekly: 4
|
|
keep-monthly: 12
|
|
keep-yearly: 3
|
|
# NOTE: no `prune: true` — rest-server runs with --append-only.
|
|
# See README.md "Prune ceremony".
|
|
tag:
|
|
- host:ana-ml2
|
|
# Schedule removed 2026-04-21: forget against --append-only rest-server
|
|
# always fails (delete ops blocked). Run manually during the prune
|
|
# ceremony when --append-only is temporarily off.
|
|
|
|
check:
|
|
read-data-subset: 10%
|
|
schedule: "Sun *-*-* 05:00:00"
|
|
schedule-permission: system
|
|
schedule-log: /var/log/restic-check.log
|