self-preserve
Self-Preserve
Backup readiness assessment and automated backup scheduling for your OpenClaw agent.
OpenClaw's agent state model defines a set of standard files: config (openclaw.json), memory (MEMORY.md, memory/*.md), identity (SOUL.md, IDENTITY.md, USER.md), workspace (AGENTS.md, TOOLS.md, HEARTBEAT.md), installed skills, and cron jobs. This skill checks whether those files exist, whether they are covered by a recent local backup, and whether an offsite copy exists somewhere other than this machine. It can also schedule, update, or remove automated backup cron jobs.
Local backup is not disaster recovery. A tar.gz in ~/openclaw-backups/ protects against accidental edits but not against disk failure, device loss, theft, or a wipe of the home directory — in those cases the agent state and its backups disappear together. True disaster recovery requires at least one copy living somewhere other than this machine. This skill surfaces whether that offsite copy exists and advises on generic approaches; it does not perform the offsite copy itself (see Step 5).
You are only listing file names, sizes, and dates — never reading or printing file contents.
Safety Rules — Read These First
- Never read file contents. Use only
ls -lato check file names, sizes, and dates. Never usecat,head,tail,less, or any command that outputs file contents. - Skip the credentials directory entirely. Do not list, read, stat, or reference
~/.openclaw/credentials/or anything inside it. - Stay inside
~/.openclaw/only. Do not access~/.ssh/,~/.env,~/.aws/,~/.config/, or any path outside~/.openclaw/. The only exceptions are the backup directory in Step 2 and the optional offsite marker file in Step 8. - Never output secrets. If you accidentally see a key, token, or password in any output, do not repeat it. Replace it with
[REDACTED]. - Do not modify user files. Steps 1-5 are read-only. Steps 6-7 may create, update, or delete cron schedules only when the user explicitly confirms. Never modify config, memory, identity, or workspace files.