ci-static / secret-scan (push) Successful in 21s
ci-static / yamllint (push) Successful in 30s
ci-static / ansible-syntax (push) Successful in 28s
ci-static / markdown-links (push) Successful in 22s
ci-static / secret-scan (pull_request) Successful in 20s
ci-static / yamllint (pull_request) Successful in 30s
ci-static / ansible-syntax (pull_request) Successful in 27s
ci-static / markdown-links (pull_request) Successful in 20s
- open_webui-Rolle: Theme (files/theme/gnai-catppuccin-mocha.css) und Favicon (files/favicon/*, byte-identisch zum Dashboard-Original) werden host-seitig deployt und im Quadlet read-only ueber die Image-Platzhalter in /app/backend/open_webui/static/ gemountet — update-persistent, weil der Mount host-seitig liegt und OpenWebUIs Start-Wipe von static/ eine ro-Datei nicht anfassen kann. Inode-Befund: copy->Rename tauscht den Inode, daher notify Restart + flush_handlers vor den Served-Checks. - Served-Verifikation in der Rolle: /static/custom.css (Marker) und /static/favicon.png (byte-identisch via content_length). - ai_backup: zusaetzliche Pfade etc/gnmon und var/lib/ghostnet-ai/production/openwebui-data; die live webui.db (+wal/shm) wird aus dem tar ausgeschlossen und stattdessen als konsistenter Snapshot via SQLite-Online-Backup-API (python3 stdlib) an derselben Archiv-Position angehaengt (tar uncompressed -> append -> gzip). - Doku: GNAI-021 (neu) + ai-README-Index; Link auf GNMON-000 korrigiert. - Live ausgerollt 14.11.2026 auf 10.0.0.90 (webui.yml + ai.yml konvergent changed=0): custom.css 200/5311 B mit Marker, favicon.png 200/2729 B, alle 6 ro-Mounts am laufenden Container gebunden. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
3.7 KiB
3.7 KiB
ai_backup
Configuration backup for the AI server (GNAI-001 milestone 4). Deploys
gnai-ai-backup (script), a oneshot service and a weekly timer
(Sunday 03:30, Persistent=true). Target is the existing NFS pipeline
share (pve:/media/datenhdd3/Encoding, operator decision 06.11.2026).
Backup scope
/etc/ghostnet-ai(all environment config trees)/etc/gnmon(dashboard OIDC env filedashboard-secrets.env; added 14.11.2026, GNAI-021 follow-up)/etc/containers/systemd/users/{980,981,984}(rootless quadlets, included when present)/var/lib/ghostnet-ai/environment-state(switch state)/var/lib/ghostnet-ai/production/openwebui-data(OpenWebUI app + user data: uploads, cache; added 14.11.2026, GNAI-021 follow-up). The livewebui.db/-wal/-shmare excluded from the tar; instead a consistent snapshot via SQLite's online-backup API (python3 stdlib) is appended at the same archive path, so a mid-write WAL state is never archived./var/lib/ghostnet-ai/testing/bench/results(benchmark artifacts)/var/lib/ghostnet-ai/shared/modelswithout*.gguf— the pinnedSOURCE.ymlmanifests make the weights reproducible through the model_store role (--tags modelsre-downloads and verifies them)
Every archive gets a .sha256 sidecar; the archive is integrity-checked
before it replaces the last good file; retention keeps the newest
ai_backup_retention archives.
Operations
- Run a backup now:
systemctl start gnai-ai-backup.service(the timer does this weekly;systemctl list-timers gnai-ai-backup*shows the next run). - Watch:
journalctl -u gnai-ai-backup.service -n 20. - Boot ordering: the service unit carries
RequiresMountsFor=/var/lib/ghostnet-pipeline, so every start (including the Persistent timer run after a reboot) pulls in and waits for the escaped mount unitvar-lib-ghostnet\x2dpipeline.mount. The earlier literalAfter=var-lib-ghostnet-pipeline.mountnever matched the escaped unit name and therefore never ordered anything — at boot on 09.11.2026 the timer raced the mount and the script exited 21 (GNAI-008 14.6). Fixed and verified 09.11.2026:systemctl showlists the mount unit under Requires=/After=, a manualsystemctl startfinished withResult=successand produced a sha256-verified archive on the share, and a second role run reportschanged=0.
Restore SOP
- Identify the archive on the share:
ls -lt /var/lib/ghostnet-ai-backup/ghostnet-ai-backup-*.tar.gz - Verify the sidecar:
sha256sum -c <archive>.sha256 - Extract to a staging directory first (never extract blindly over
live files):
mkdir /tmp/gnai-restore && tar -xzf <archive> -C /tmp/gnai-restore - Compare or selectively copy back the affected tree, e.g.
diff -r /tmp/gnai-restore/etc/ghostnet-ai/testing /etc/ghostnet-ai/testing - For environment-state restores, run
/usr/local/sbin/gnai-environment-switch recoverafterwards so the runtime converges with the restored state. - For model weights: restore via the model_store role
(
--tags models), then verify theSOURCE.ymlchecksums. - For OpenWebUI user data (
var/lib/ghostnet-ai/production/openwebui-data): stop the unit (runuser -u gnai-production -- systemctl --user stop gnai-production-openwebui), copy the archivedwebui.dbback,chown -R gnai-production:gn-productionthe data dir, start the unit, then re-runplaybooks/webui.yml(re-applies model/tool/config sync) and verify/health+ model list. - Re-run the affected environment playbook
(
playbooks/ai.yml --tags service) and verify health.
Accepted proof (06.11.2026): full-tree extract-and-diff against the live configuration and a practical restore of the deleted environment state file, documented in GNAI-008 section 14.6.