agentleFS
YauhenBichelYauhenBichel/engineering-skills/skills/data-durability/SKILL.md

data-durability

Skill0 starsChanged 53 days agoApache-2.0View on GitHub

Protects data: backups, restores, migrations without loss. Use when data must not be lost.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep at least one copy on another disk and one outside the building (3-2-1).

    line 10
  2. Distinctive:

    Test a restore on a schedule: restore into an empty directory, open the files, run a query on each database.

    line 11
  3. Distinctive:

    Before a risky change (migration, upgrade), take a backup and write down the restore command.

    line 13

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Steps

  1. List what must survive: databases, config, user files. Name the owner and how much loss is acceptable (hours, a day).
  2. Back up with a tool that keeps versions and checks itself (restic, borg, or the database's own backup). A plain rsync --delete mirror is not a backup: it copies deletions and damage too.
  3. Copy databases consistently: sqlite3 db ".backup copy.db", pg_dump, or the engine's backup API. Never copy a live database file with cp.
  4. Keep at least one copy on another disk and one outside the building (3-2-1).
  5. Test a restore on a schedule: restore into an empty directory, open the files, run a query on each database.
  6. In code: write a temporary file, fsync it, then rename it over the old one, so a crash never leaves half a file.
  7. Before a risky change (migration, upgrade), take a backup and write down the restore command.

Checklist

  • Every important path is in the backup (check the backup's file list, not the config)
  • Database copies are made with the engine's backup method
  • A copy exists off-site
  • The last restore test passed, and its date is known
  • State files are written atomically (temp file, fsync, rename)
  • A backup was taken before this change, and the restore command is written down

Output

  • What is backed up, where, how often, and the date of the latest backup
  • Paths not covered, if any
  • Result and date of the last restore test
  • The restore command for the change at hand

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.