From e130fb9173db81f1316ee2ef77ef62293b336290 Mon Sep 17 00:00:00 2001 From: Yanujz Date: Sun, 20 Sep 2026 11:43:40 +0200 Subject: [PATCH] Replace unsafe hot-copy advice with sqlite3 online backup A plain cp of the live SQLite file can capture a torn write, producing an unrestorable backup. Document .backup plus integrity_check on restore instead. Fixes #66 --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ab4857..cc00529 100644 --- a/README.md +++ b/README.md @@ -193,8 +193,11 @@ service at one probe/minute over 90 days. - **Health & metrics:** point probes at `/healthz` (`HEALTHCHECK` is baked into the image); scrape `/metrics` and alert on `epmon_service_up == 0`. -- **Data:** back up the SQLite file — hot copies while running are safe — - or mount the volume into your backup job. +- **Data:** back up the SQLite file with the online backup — never a + plain `cp` of the live file, which can capture a torn write: + `sqlite3 /data/epmon.db ".backup '/backup/epmon-$(date -u +%FT%TZ).db'"` + (then `PRAGMA integrity_check` on restores), or mount the volume into + your backup job and back up from there. ## Metrics (`/metrics`, Prometheus text format)