跳至主要内容
小龙虾小龙虾AI
🤖

OpenClaw Backup Safe

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...

下载614
星标2
版本1.0.1
开发工具
安全通过
💬Prompt

技能说明


name: openclaw-backup description: 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.

OpenClaw Backup

Backup and restore OpenClaw configuration, credentials, and workspace.

Create Backup

Run the backup script:

./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:

{
  "name": "daily-backup",
  "schedule": {"kind": "cron", "expr": "0 3 * * *", "tz": "UTC"},
  "payload": {
    "kind": "agentTurn",
    "message": "Run ~/.openclaw/workspace/skills/openclaw-backup/scripts/backup.sh and report result to user."
  },
  "sessionTarget": "isolated",
  "delivery": {"mode": "announce"}
}

Restore

See references/restore.md for step-by-step restore instructions.

Quick restore:

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.

如何使用「OpenClaw Backup Safe」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「OpenClaw Backup Safe」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能