{"skill":{"slug":"openclaw-backup-safe","displayName":"OpenClaw Backup Safe","summary":"Backup and restore OpenClaw data. Use when user asks to create backups, set up automatic backup schedules, restore from backup, or manage backup rotation. Ha...","description":"---\nname: openclaw-backup\ndescription: Backup and restore OpenClaw data. Use when user asks to create backups, set up automatic backup schedules, restore from backup, or manage backup rotation. Handles ~/.openclaw directory archiving with proper exclusions.\n---\n\n# OpenClaw Backup\n\nBackup and restore OpenClaw configuration, credentials, and workspace.\n\n## Create Backup\n\nRun the backup script:\n\n```bash\n./scripts/backup.sh [backup_dir]\n```\n\nDefault backup location: `~/openclaw-backups/`\n\nOutput: `openclaw-YYYY-MM-DD_HHMM.tar.gz`\n\n## What Gets Backed Up\n\n- `openclaw.json` - main config\n- `credentials/` - API keys, tokens\n- `agents/` - agent configs, auth profiles\n- `workspace/` - memory, SOUL.md, user files\n- `telegram/` - session data\n- `cron/` - scheduled tasks\n\n## Excluded\n\n- `completions/` - cache, regenerated automatically\n- `*.log` - logs\n\n## Setup Daily Backup with Cron\n\nUse OpenClaw cron for daily backups with notification:\n\n```json\n{\n  \"name\": \"daily-backup\",\n  \"schedule\": {\"kind\": \"cron\", \"expr\": \"0 3 * * *\", \"tz\": \"UTC\"},\n  \"payload\": {\n    \"kind\": \"agentTurn\",\n    \"message\": \"Run ~/.openclaw/workspace/skills/openclaw-backup/scripts/backup.sh and report result to user.\"\n  },\n  \"sessionTarget\": \"isolated\",\n  \"delivery\": {\"mode\": \"announce\"}\n}\n```\n\n## Restore\n\nSee [references/restore.md](references/restore.md) for step-by-step restore instructions.\n\nQuick restore:\n\n```bash\nopenclaw gateway stop\nmv ~/.openclaw ~/.openclaw-old\ntar -xzf ~/openclaw-backups/openclaw-YYYY-MM-DD_HHMM.tar.gz -C ~\nopenclaw gateway start\n```\n\n## Rotation\n\nScript keeps last 7 backups automatically.\n","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":2504,"installsAllTime":94,"installsCurrent":24,"stars":2,"versions":1},"createdAt":1771291893890,"updatedAt":1778491560329},"latestVersion":{"version":"1.0.1","createdAt":1771291893890,"changelog":"Hardening de restore sem rm -rf; backup.sh robustecido com validações e rotação segura.","license":null},"metadata":null,"owner":{"handle":"alessandropcostabr","userId":"s17cd88cpsbdk489mxfazhmg5h84xq5x","displayName":"alessandropcostabr","image":"https://avatars.githubusercontent.com/u/191734104?v=4"},"moderation":null}