# An old backup habit for an AI world.

2026-06-16 · Joakim Jardenberg. Original in English. Titles and image descriptions added by AI.

Hörni, I think you should all add a version of this to your CLAUDE.md, AGENTS.md or equivalent. Even if you sync to git, this is an old practice that never gets old. Has helped me so many times. 
"""
## File Safety & Backup Policy

Before overwriting a protected file, create a timestamped backup. Backup
creation is a mandatory prerequisite for the edit and must never be skipped,
even for a one-line change. If the backup fails, abort the edit.

### What gets backed up

**Tier A - automatic, no permission needed.** The canonical control files,
where a bad overwrite actually hurts:
- `00_System/**` (README, Schemas/, Tools/, engine definitions, Project_Container_Spec)
- every `INDEX.md`, every `04_Projects/**/_meta.md`
- `CLAUDE.md` and `AGENTS.md`

**Tier B - opt-in, any working file.** Backups are NOT automatic for ordinary
Repository notes, Inbox files, or anything outside Tier A. JJ can switch them on
at any granularity by saying so: "back up before you edit," "safety on for this
file/folder," or "safety on for this session." When on, the same mechanism
applies until JJ turns it off or the session ends.

**Never backed up.** `03_Outputs/` (dated snapshots are immutable by convention -
never edited in place; if an output must change, write a new dated file),
`04_Projects/` content (sealed, own rules), `.obsidian/`, `.smart-env/`
(tool-managed).

### How

1. Locate the existing file.
2. Write the backup to the quarantine folder, mirroring the original path:
  `00_System/.backups/<original-relative-path>.bak.<YYYYMMDDHHMMSS>`
  (local time, 14-digit timestamp).
3. Verify the backup exists.
4. Only then modify the original.
5. Multiple files changed = one backup each.

### Rules

- Never overwrite an existing backup. If the name already exists (two edits in
 the same second), append `_2`, `_3`, ...
- Preserve the original filename and extension inside the backup name.
- The `.backups/` folder is quarantined: engines and the Librarian ignore it
 exactly like `.obsidian/`. A file there is never routing drift.
- Retention: prune backups older than 90 days OR keep the last 10 per file
 (whichever happens first, and/or is safest given context).

When in doubt, create the backup.

[Original LinkedIn post](https://www.linkedin.com/feed/update/urn:li:activity:7472704674052128768/)

Source: https://jardenberg.com/notes/an-old-backup-habit-for-an-ai-world

Joakim Jardenberg. Original in English. Titles and image descriptions added by AI.

Joakim Jardenberg’s own writing: CC BY 4.0. Credit Joakim Jardenberg and preserve AI + JJ / AI translation attribution. Third-party quotations, recommendations, photographs, screenshots, logos and media retain their own rights and are excluded.
Licence: https://creativecommons.org/licenses/by/4.0/
