Verify automatic application trigger and complete Chapter 5 evidence audit
manual-pdf / build-manual (push) Successful in 1m16s

This commit is contained in:
2026-10-30 21:28:50 +00:00
parent 8e20b016ce
commit 61c1efdc0a
18 changed files with 838 additions and 8 deletions
+11
View File
@@ -0,0 +1,11 @@
# Monitoring backup and recovery procedure
Owner: Sergio (sespinal). This is an operator procedure, not a claim that a new monitoring backup or restore was performed. The retained DigitalOcean snapshot predates monitoring deployment.
1. Arrange a maintenance window and an approved encrypted backup destination outside this droplet. Check free bytes and estimated archive size first; retain the 15% free-space margin. Do not stage a full volume archive on the retained 10 GB root disk unless space is proven sufficient. A second directory on this droplet is not an off-host backup.
2. Record the source commit, image digests, Grafana plugin 13.2.4, Docker volume names and current UTC time. Stop Grafana before copying its SQLite state, and stop Prometheus before copying its entire data directory. Use a shell trap/finally block to restart both services even if copying fails. Leave Gitea, Caddy and Jenkins running.
3. Preserve `/var/lib/docker/volumes/monitoring_grafana_data/_data` and `/var/lib/docker/volumes/monitoring_prometheus_data/_data`, ownership, permissions and timestamps. Grafana's database is `grafana.db`; Prometheus history includes blocks, WAL and head data. Transfer with an approved binary-safe archive/SSH tool to the off-host destination. Also preserve `/opt/ssw590-monitoring/.env`, `grafana/provisioning/alerting/discord.local.yml`, and `/opt/gitea/Caddyfile` privately. Credentials, the Discord URL, sessions, and state archives must never enter Git, the PDF, screenshots or chat. Use root-only local permissions and encrypted storage/transport. Pin/reinstall the Prometheus plugin if omitting its reconstructible plugin files from the archive.
4. Restart using `docker compose start prometheus grafana` in `/opt/ssw590-monitoring`; check health, old samples, dashboard, datasource, rules, contact point and both probes. Record the collection gap. Generate and verify archive checksums at source and destination. Retain a dated inventory and agreed retention period. Remove temporary local archives only after destination verification and owner approval.
5. Prove recovery in isolated replacement volumes, not by overwriting the live volumes. Use the same source/images/plugin first; restore files with UID 472 for Grafana and the original Prometheus ownership. Restore the protected environment/contact provisioning privately, validate configuration and verify historical query results, HTTPS, alert routing and a test notification. An isolated recovery success is separate evidence from the already completed container restart test. Do not delete the live volumes or revert the droplet without explicit authorization.
Example checks (read-only): `docker volume inspect monitoring_grafana_data monitoring_prometheus_data`; `df -B1 /`; `du -sb <verified-volume-path>`. Any archive/restore commands must use the inspected paths and the approved backup destination. Review the official Grafana backup guide and Prometheus storage guidance cited in the manual.