🤖
Simple Backup
Backup agent brain (workspace) and body (state) to local folder and optionally sync to cloud via rclone.
安全通过
技能说明
name: simple-backup description: Backup agent brain (workspace) and body (state) to local folder and optionally sync to cloud via rclone. metadata: {"openclaw":{"emoji":"💾","requires":{"bins":["rclone","gpg","tar","jq"]}}}
Simple Backup
A robust backup script that:
- Auto-detects workspace and state directories from OpenClaw config
- Allows overrides for custom/non-standard setups
- Compresses & encrypts using GPG (AES256)
- Prunes old backups (Daily/Hourly retention)
- Syncs to cloud via
rclone(optional)
Setup
-
Dependencies:
brew install rclone gnupg jq -
Password: Set encryption password (choose one):
- File:
~/.openclaw/credentials/backup.key(recommended) - Env:
export BACKUP_PASSWORD="secret" - Config: Add
"password": "secret"to skill config
- File:
-
Cloud (Optional):
rclone config
Usage
simple-backup
Auto-Detection
By default, paths are auto-detected from ~/.openclaw/openclaw.json:
- Workspace:
agents.defaults.workspace - State:
~/.openclaw(where config lives) - Backup root:
<workspace>/BACKUPS
Custom Configuration
For non-standard setups, override any path in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"simple-backup": {
"config": {
"workspaceDir": "/custom/path/workspace",
"stateDir": "/custom/path/state",
"skillsDir": "/custom/path/skills",
"backupRoot": "/custom/path/backups",
"remoteDest": "gdrive:backups"
}
}
}
}
}
Configuration Reference
| Config Key | Env Var | Auto-Detected | Description |
|---|---|---|---|
workspaceDir | BRAIN_DIR | agents.defaults.workspace | Agent workspace |
stateDir | BODY_DIR | ~/.openclaw | OpenClaw state dir |
skillsDir | SKILLS_DIR | ~/openclaw/skills | Skills directory |
backupRoot | BACKUP_ROOT | <workspace>/BACKUPS | Local backup storage |
remoteDest | REMOTE_DEST | (none) | Rclone remote path |
maxDays | MAX_DAYS | 7 | Days to keep daily backups |
hourlyRetentionHours | HOURLY_RETENTION_HOURS | 24 | Hours to keep hourly |
password | BACKUP_PASSWORD | (none) | Encryption password |
Priority: Config file → Env var → Auto-detect
如何使用「Simple Backup」?
- 打开小龙虾AI(Web 或 iOS App)
- 点击上方「立即使用」按钮,或在对话框中输入任务描述
- 小龙虾AI 会自动匹配并调用「Simple Backup」技能完成任务
- 结果即时呈现,支持继续对话优化