feat(restic fv-ml1): Diariz in the host backup — run-before pg_dump (soft-fail), stage dir, model cache + raw pgdata excluded; first snapshot 776b700b

This commit is contained in:
vh
2026-10-19 11:23:37 -07:00
parent 366d6fdccd
commit f267d8997a
3 changed files with 52 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# fv-ml1: add the Diariz pilot to the host's restic backup (Prime 2026-10-19 "back it up now"): a run-before pg_dump
# (soft-fail), /var/lib/restic/stage in the sources, the regenerable model cache and the raw pgdata excluded. Then one
# backup run now and a check that the snapshot holds the dump and the recordings volume.
steps:
- {name: dump hook, upload: {src: configs/restic/ana-ml2/diariz-dump.sh, dest: /etc/restic/diariz-dump.sh, mode: "0755"}, sudo: true}
- name: Back up the live profile
sudo: true
shell: cp -p /etc/restic/profiles.yaml /etc/restic/profiles.yaml.bak-20261019-diariz
creates: /etc/restic/profiles.yaml.bak-20261019-diariz
- {name: profile, upload: {src: configs/restic/ana-ml2/profiles.yaml, dest: /etc/restic/profiles.yaml, mode: "0644"}, sudo: true}
- name: The profile parses
sudo: true
shell: cd /etc/restic && resticprofile show 2>&1 | grep -E "run-before|diariz|stage" | head -6
changed_when: "false"
- name: Back up NOW (the whole host, incremental)
sudo: true
shell: cd /etc/restic && resticprofile backup 2>&1 | grep -E "diariz-dump|processed|snapshot .* saved|Fatal|error" | tail -6
verify:
- name: The latest snapshot holds the dump and the recordings volume
sudo: true
shell: |
cd /etc/restic && . /etc/restic/restic.env 2>/dev/null
restic -r "$(cat /etc/restic/repository)" --password-file /etc/restic/password ls latest /var/lib/restic/stage/diariz /var/lib/docker/volumes/diariz_s3data 2>/dev/null | grep -c -E "diariz.pgdump|diariz_s3data" ; ls -la /var/lib/restic/stage/diariz/
changed_when: "false"