Initial commit with translated description

This commit is contained in:
2026-03-29 08:20:41 +08:00
commit 585f8bd549
4 changed files with 151 additions and 0 deletions

68
SKILL.md Normal file
View File

@@ -0,0 +1,68 @@
---
name: openclaw-backup
description: "备份和恢复OpenClaw数据。在用户要求创建备份、设置自动备份计划、从备份恢复或管理备份轮换时使用。处理~/.openclaw目录归档并进行适当的排除。"
---
# OpenClaw Backup
Backup and restore OpenClaw configuration, credentials, and workspace.
## Create Backup
Run the backup script:
```bash
./scripts/backup.sh [backup_dir]
```
Default backup location: `~/openclaw-backups/`
Output: `openclaw-YYYY-MM-DD_HHMM.tar.gz`
## What Gets Backed Up
- `openclaw.json` — main config
- `credentials/` — API keys, tokens
- `agents/` — agent configs, auth profiles
- `workspace/` — memory, SOUL.md, user files
- `telegram/` — session data
- `cron/` — scheduled tasks
## Excluded
- `completions/` — cache, regenerated automatically
- `*.log` — logs
## Setup Daily Backup with Cron
Use OpenClaw cron for daily backups with notification:
```json
{
"name": "daily-backup",
"schedule": {"kind": "cron", "expr": "0 3 * * *", "tz": "UTC"},
"payload": {
"kind": "agentTurn",
"message": "Run ~/.openclaw/backup.sh and report result to user."
},
"sessionTarget": "isolated",
"delivery": {"mode": "announce"}
}
```
## Restore
See [references/restore.md](references/restore.md) for step-by-step restore instructions.
Quick restore:
```bash
openclaw gateway stop
mv ~/.openclaw ~/.openclaw-old
tar -xzf ~/openclaw-backups/openclaw-YYYY-MM-DD_HHMM.tar.gz -C ~
openclaw gateway start
```
## Rotation
Script keeps last 7 backups automatically.