Backup, restore, rollback, validate, and GitHub-sync critical OpenClaw state.
openclaw-backup-restore protects the files that make an OpenClaw agent feel like itself: personality, operator instructions, memory scaffolding, and optional real config.
Best for: backup, restore, rollback, daily GitHub backup, and recovery readiness.
- Protect
SOUL.md,USER.md,AGENTS.md, and related state files - Recover quickly after bad edits, deletions, or config mistakes
- Validate backup integrity with checksums
- Keep versioned recovery points instead of hoping git history is enough
- Push daily backups off-machine to GitHub
Core workspace state such as:
SOUL.mdUSER.mdAGENTS.mdIDENTITY.mdTOOLS.mdHEARTBEAT.mdBOOTSTRAP.md- optional
~/.openclaw/openclaw.json
By default, config backup is sanitized unless you explicitly choose real-config mode.
Install:
npm installCreate a backup:
node scripts/backup.mjsInclude real config:
node scripts/backup.mjs --raw-openclaw-configList backups:
node scripts/list.mjsRestore latest backup:
node scripts/restore.mjsDry-run restore:
node scripts/restore.mjs --dry-runValidate integrity:
node scripts/validate.mjsCreate a backup and push it off-machine:
node scripts/backup-and-push.mjs --remote originPush sanitized-config-only backup:
node scripts/backup-and-push.mjs --remote origin --sanitized-config-onlyThis repo is designed for daily backup workflows, rollback drills, and off-machine recovery.
- timestamped backups
- named backups for milestones
- rollback after bad restore
- file-level restore
- checksum validation
- optional real config backup
- git add / commit / push workflow for off-machine copies
- “Back up my OpenClaw workspace”
- “Restore yesterday’s working state”
- “Roll back this bad change”
- “Validate that my backups are not corrupt”
- “Push daily OpenClaw backups to GitHub”
SKILL.md— agent-facing routing and usage guideRUNBOOK.md— operations and recovery scenariosFEATURE_DEFINITION.md— positioning and roadmapscripts/backup.mjs— create a backupscripts/restore.mjs— restore a backupscripts/list.mjs— list available backupsscripts/validate.mjs— verify backup integrityscripts/backup-and-push.mjs— create backup and git-push it
- Backups are only useful if restore paths are tested
- Real
openclaw.jsonbackups should live in private backup repos - This repo improves recovery readiness, but it does not replace disaster-recovery drills
If your OpenClaw agent matters, its workspace state should be recoverable on demand. This repo gives you the backup + restore foundation for that.