agentleFS
JimmyHuang2002JimmyHuang2002/hermes-backup-recovery/SKILL.md

backup-recovery

Skill1 starsChanged 4 months agoMITView on GitHub

Back up, verify, and restore a long-running Hermes deployment's state (memory, learned skills, config, chat history). Use when the user asks to protect against data loss, set up scheduled encrypted backups, run a restore drill, check whether backups are healthy, or recover after a crash or disk failure. Designed for always-on agents where losing state is not acceptable. Provider- and hardware-agnostic.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. philipyaz/cos★ 4same name
    2. ffsshhttiikk/opencode-agents-skills★ 2same name
    3. hallucinaut/skills★ 0same name
    4. lengrufeng2008/dsh-skill-library★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep an always-on Hermes instance recoverable.

    line 13
  2. Very specific:

    Never print or log the contents of AGE_IDENTITY or any provider key.

    line 54
  3. Very specific:

    Never delete backups except through backup.sh's own KEEP retention.

    line 55
  4. Very specific:

    Before a real (--apply) restore, confirm with the user — it overwrites files in RESTORE_TARGET.

    line 57
  5. Distinctive:

    If a script exits non-zero, report the exact failure.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Hermes backup & recovery

Keep an always-on Hermes instance recoverable. This skill wraps four small scripts in scripts/ that do the actual work; your job is to run the right one with the right environment and report the result clearly.

What gets protected

Everything under $HERMES_HOME — the directory where Hermes keeps memory, skills, config, and chat history. Confirm the real path with the user before running anything; do not guess it.

Configuration (environment variables)

VariableUsed byMeaning
HERMES_HOMEbackup, healthcheckHermes data directory to protect
BACKUP_DIRallWhere encrypted backups are written/read
AGE_RECIPIENTbackupage public key (age1...) to encrypt to
AGE_IDENTITYverify, restoreage private key file (keys.txt) to decrypt with
KEEPbackupHow many backups to retain (default 14)
RESTORE_TARGETrestoreDirectory to restore into
HERMES_SERVICEhealthchecksystemd unit name (default hermes)
MAX_BACKUP_AGE_HhealthcheckWarn if newest backup is older than this (default 26)

The private key (AGE_IDENTITY) must live off the box, not next to the backups. If it sits on the same machine, an attacker or a disk failure takes both.

How to run each task

  • Back up now → scripts/backup.sh. Requires HERMES_HOME, BACKUP_DIR, AGE_RECIPIENT. Produces a timestamped, encrypted hermes-<ts>.tar.gz.age plus a .sha256, and prunes old backups beyond KEEP.
  • Verify a backup → scripts/verify.sh [file]. Requires BACKUP_DIR, AGE_IDENTITY. Checks the checksum and test-decrypts + lists the archive. Defaults to the newest backup if no file is given. Run this after every scheduled backup — a backup you can't decrypt is worthless.
  • Restore → scripts/restore.sh [--apply] <file>. Requires AGE_IDENTITY, RESTORE_TARGET. Dry-run by default (lists what it would write); only --apply actually writes. After a real restore, tell the user to review the target and restart Hermes.
  • Health check → scripts/healthcheck.sh. Exits 0 if healthy, 1 if attention is needed (service down, disk >90%, or no recent backup). Good on a timer wired to a notification.

Guardrails

  • Never print or log the contents of AGE_IDENTITY or any provider key.
  • Never delete backups except through backup.sh's own KEEP retention. Do not "clean up" backups on your own initiative.
  • Before a real (--apply) restore, confirm with the user — it overwrites files in RESTORE_TARGET.
  • If a script exits non-zero, report the exact failure; do not retry blindly or fabricate success.

Scheduling

For unattended operation, run backup.sh on a nightly systemd timer and healthcheck.sh a bit later, routing a non-zero health result to whatever channel the user watches. See the companion guide Running Hermes 24/7 on dedicated hardware.

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.