From 0481f162eeb73ff9c0e568d83fe66166d92e1e8d Mon Sep 17 00:00:00 2001 From: Julien Lutran Date: Fri, 28 Aug 2026 18:42:58 +0200 Subject: [PATCH] =?UTF-8?q?restic-backup:=20=C2=A77=20becomes=20a=20script?= =?UTF-8?q?ed,=20repeatable=20restore=20drill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- ks4/restic-backup.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ks4/restic-backup.md b/ks4/restic-backup.md index 188b5db..34102d6 100644 --- a/ks4/restic-backup.md +++ b/ks4/restic-backup.md @@ -248,15 +248,26 @@ freshness reasoning as before. One shared repo would dedup the Ubuntu base across all replicas. Restore granularity: per-file; instance definitions ride the dump tree (`incus/.yaml` + `incus-global-db.sql`). -## 7. Restore test (gate) +## 7. Restore drill (gate, then quarterly) -Per repo, one restore + diff (never to `/tmp` — 16 GiB tmpfs): +Scripted — [`restic-restore-test.sh`](https://git.lutran.fr/julien/scripts/src/branch/main/restic-restore-test.sh): ```sh -restic -r s3:…/restic-data restore latest --target /backup/restore-test --include '' -diff -r … && rm -rf /backup/restore-test +/root/scripts/restic-restore-test.sh # tree + dump, ~2 min +/root/scripts/restic-restore-test.sh -d # also loads the dump into a + # throwaway container (strongest) ``` +It restores a filesystem tree from the latest snapshot and diffs it +against the live one, restores a database dump and checks it is +well-formed (`CREATE TABLE` count + `Dump completed` marker), then +cleans up (`-k` keeps the files, `-w` changes the work dir). Never +restore into `/tmp` — it is a 16 GiB tmpfs on ks4; the script writes +under `/backup`. + +A backup leg that has never been restored from is a hypothesis, not a +backup: run this at the cutover gate and once a quarter after. + ## 8. Cutover (done) + what is left Legacy on the box: plakar is still installed and its `plakar-data`