# ClawBackup

> Claw Backup

- Skill: `vidarbrekke/clawbackup` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add vidarbrekke/clawbackup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vidarbrekke/clawbackup/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vidarbrekke (https://skillmd.com/u/vidarbrekke)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vidarbrekke/clawbackup

---

# Claw Backup
Version: 1.0.15

Back up your OpenClaw customizations (memory, config, skills, workspace) to an `rclone` destination on a schedule (Google Drive by default). 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

## Restore notes

Each archive includes `RESTORE_NOTES.txt` with the correct restore targets based
on the configured paths. In general:

- `openclaw_config/skills` → `~/.openclaw/skills`
- `cursorapps_clawd/skills` → `~/Dev/CursorApps/clawd/skills` (or your chosen path)

## Quick start

1. **Prerequisites:** Node.js, [rclone](https://rclone.org/install/) 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):**
   ```bash
   git clone https://github.com/vidarbrekke/ClawBackup.git
   cd ClawBackup
   node setup.js
   ```

3. **Quick install (advanced users):**
   ```bash
   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).
- 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](https://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

