Claw Backup
Version: 1.0.15
OpenClaw backup skill — schedules backups of your OpenClaw data (memory, config, skills, workspace) to an rclone destination (e.g. Google Drive). Works on macOS, Linux, and Windows (via Git Bash or WSL).
What it does
- - Backs up clawd memory, ~/.openclaw (config, skills, modules, workspace, cron), clawd/scripts, and Dev/CursorApps/clawd (excluding
node_modules) - Runs on a schedule (macOS LaunchAgent, Linux cron, or Windows Task Scheduler)
- Applies local and remote retention so old backups are pruned
- Supports
rclone (cloud) or local-only upload mode
Before you install
- - Do not run
curl ... | node (or any one-liner) without first inspecting the script. Prefer git clone and open setup.js and install-launchagent.sh (or the cron/Task Scheduler scripts) to review what they will do. - Verify the code in
setup.js and the scheduler installer: confirm only the expected paths are archived and that there is no unexpected network use or commands. If you are uncomfortable reviewing the scripts, do not install. - Confirm repository identity: official source is github.com/vidarbrekke/ClawBackup. The version in this SKILL.md (frontmatter and "Version" line) is the source of truth; the registry may show a different revision number.
- Use encryption for sensitive backups: an encrypted rclone remote (e.g.
rclone crypt) or encrypt archives yourself before offsite storage. - After installation: inspect your LaunchAgent plist, crontab, or Task Scheduler entries, and run a test backup to a local destination first before using a cloud remote.
Restore notes
Each archive includes RESTORE_NOTES.txt with the correct restore targets based
on the configured paths. In general:
- -
openclaw_config/skills → INLINECODE11 - INLINECODE12 →
~/Dev/CursorApps/clawd/skills (or your chosen path)
Quick start
- 1. Prerequisites: Node.js, rclone configured for Google Drive, and Bash (or Git Bash on Windows).
-
rclone is only required when upload mode is
rclone.
- 2. Recommended install (review first):
CODEBLOCK0
- 3. Quick install (not recommended): Only use if you have already inspected the script. Do not run without review:
curl -fsSL https://raw.githubusercontent.com/vidarbrekke/ClawBackup/main/setup.js | node
- 4. Follow the prompts (or use
node setup.js --defaults for default paths). Then run the printed test command and install the scheduler as shown.
Security notes
- - Backups may contain sensitive data (OpenClaw config, memory, and skills).
- Setup can install recurring scheduler entries (LaunchAgent/cron/Task Scheduler); inspect these after install.
- In cloud mode, credentials come from your existing
rclone config; no extra env vars are required by this repo. - Prefer encrypted destinations (e.g.
rclone crypt) or encrypt archives before offsite storage. - Archives include checksum files (
.sha256) for integrity checks.
Repo and contributions
- - Code and full docs: github.com/vidarbrekke/ClawBackup
- Improvements welcome: Open issues or pull requests on the GitHub repo. The project is open for refinements, fixes, and features from any OpenClaw user.
License
MIT
Claw Backup
版本:1.0.15
OpenClaw 备份技能 — 将您的 OpenClaw 数据(内存、配置、技能、工作区)按计划备份到 rclone 目标位置(例如 Google Drive)。适用于 macOS、Linux 和 Windows(通过 Git Bash 或 WSL)。
功能说明
- - 备份 clawd 内存、~/.openclaw(配置、技能、模块、工作区、定时任务)、clawd/scripts 以及 Dev/CursorApps/clawd(排除 node_modules)
- 按计划运行(macOS LaunchAgent、Linux cron 或 Windows 任务计划程序)
- 应用本地和远程保留策略,自动清理旧备份
- 支持 rclone(云存储)或 local-only(仅本地)上传模式
安装前须知
- - 请勿在未检查脚本的情况下运行 curl ... | node(或任何单行命令)。建议使用 git clone,然后打开 setup.js 和 install-launchagent.sh(或 cron/任务计划程序脚本)查看其具体操作。
- 验证代码:检查 setup.js 和调度程序安装器,确认仅归档预期路径,且没有意外的网络使用或命令。如果您不习惯审查脚本,请勿安装。
- 确认仓库身份:官方来源为 github.com/vidarbrekke/ClawBackup。本 SKILL.md 文件中的版本(前置元数据和版本行)是权威依据;注册表可能显示不同的修订号。
- 对敏感备份使用加密:使用加密的 rclone 远程目标(例如 rclone crypt),或在异地存储前自行加密归档文件。
- 安装后:检查您的 LaunchAgent plist、crontab 或任务计划程序条目,并在使用云远程目标前,先对本地目标进行测试备份。
恢复说明
每个归档文件包含 RESTORE_NOTES.txt,其中根据配置的路径提供了正确的恢复目标。一般情况下:
- - openclawconfig/skills → ~/.openclaw/skills
- cursorappsclawd/skills → ~/Dev/CursorApps/clawd/skills(或您选择的路径)
快速开始
- 1. 前提条件: Node.js、已配置 Google Drive 的 rclone,以及 Bash(Windows 上为 Git Bash)。
- 仅在上传模式为 rclone 时才需要 rclone。
- 2. 推荐安装方式(请先审查):
bash
git clone https://github.com/vidarbrekke/ClawBackup.git
cd ClawBackup
node setup.js
- 3. 快速安装(不推荐): 仅在您已检查过脚本后使用。未经审查请勿运行:
bash
curl -fsSL https://raw.githubusercontent.com/vidarbrekke/ClawBackup/main/setup.js | node
- 4. 按照提示操作(或使用 node setup.js --defaults 使用默认路径)。然后运行显示的测试命令,并按说明安装调度程序。
安全说明
- - 备份可能包含敏感数据(OpenClaw 配置、内存和技能)。
- 安装程序可以安装重复执行的调度程序条目(LaunchAgent/cron/任务计划程序);安装后请检查这些条目。
- 在云模式下,凭据来自您现有的 rclone config;本仓库不需要额外的环境变量。
- 建议使用加密目标(例如 rclone crypt),或在异地存储前加密归档文件。
- 归档文件包含校验和文件(.sha256)用于完整性检查。
仓库与贡献
许可证
MIT