From 670ff225be99502c3a18e3d06222f03ae4ec9c07 Mon Sep 17 00:00:00 2001 From: otivm Date: Sat, 25 Apr 2026 20:28:55 +0000 Subject: [PATCH] Document backup and archive procedure in CLAUDE.md --- CLAUDE.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 56e1c2e..c2de53e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -292,5 +292,60 @@ foundation — see docs/roadmap.md. --- +## Backup and Archive Procedure + +Backups are vzdump snapshots of LXC 1105 taken on srv-a (the Proxmox host). +Every backup must be documented in docs/archives.md immediately after it is taken. +Never take a backup without documenting it. Never document a backup that was not taken. + +### When to take a backup + +Take a backup at these moments, in this order: +1. Before starting any new release (e.g. before OTIVM-II work begins) +2. After completing and confirming a release milestone +3. Any time the human requests one explicitly + +### How to take a backup (root shell on srv-a) + +```bash +vzdump 1105 --compress zstd --storage local --mode snapshot +``` + +Wait for it to complete. Note the filename from the output — it follows the pattern: +`vzdump-lxc-1105-YYYY_MM_DD-HH_MM_SS.tar.zst` + +Copy the archive to USB immediately after. The human does this manually. + +### How to document a backup + +After the backup is taken and confirmed, append a new entry to docs/archives.md. +The entry must follow the exact format of existing entries in that file. +Each entry must include: + +- Filename, date, size, container, host, storage locations +- Exact state of the container at time of archive — what is installed, what is + committed, what is NOT yet present +- What the archive is good for — what a restoring agent would need to do after restore +- The exact pct restore command + +### How Claude Code handles this + +Claude chat produces the docs/archives.md append as a downloadable file. +The file header instructs Claude Code to append to docs/archives.md. +Claude Code appends exactly the content given, commits, and pushes. + +### Restore (root shell on srv-a) + +```bash +pct restore 1105 /var/lib/vz/dump/FILENAME.tar.zst --force +``` + +After restore: pull latest from Gitea, run npm install, npm run build, +pm2 restart otivm, pm2 save. The game will be live again. + +Full archive inventory and restore notes: docs/archives.md + +--- + *CLAUDE.md — OTIVM — TheRON* *Claude Code implements. Claude chat designs. The human decides.*