# Simple Backup

> Backup agent brain (workspace) and body (state) to local folder and optionally sync to cloud via rclone.

- Skill: `danstrem2/simple-backup` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add danstrem2/simple-backup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/danstrem2/simple-backup/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: danstrem2 (https://skillmd.com/u/danstrem2)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/danstrem2/simple-backup

---


# Simple Backup

A robust backup script that:
1.  **Stages:** Copies `~/clawd` (workspace), `~/.clawdbot` (state), and `skills/`.
2.  **Compresses:** Creates a `.tgz` archive.
3.  **Encrypts:** AES256 encryption using GPG (password required).
4.  **Prunes:** Rotates backups (Daily/Hourly retention).
5.  **Syncs:** Optionally pushes to a cloud provider via `rclone`.

## Setup

1.  **Dependencies:** Ensure `rclone` and `gpg` are installed (`brew install rclone gnupg`).
2.  **Password:** Set the encryption password:
    *   Env Var: `export BACKUP_PASSWORD="my-secret-password"`
    *   File: `~/.clawdbot/credentials/backup.key`
3.  **Cloud (Optional):** Configure an rclone remote:
    ```bash
    rclone config
    ```

## Usage

Run the backup:
```bash
simple-backup
```

## Configuration

You can override defaults with environment variables:

| Variable | Default | Description |
|----------|---------|-------------|
| `BACKUP_ROOT` | `~/clawd/BACKUPS` | Local storage location |
| `REMOTE_DEST` | (empty) | Rclone path (e.g. `gdrive:backups`) |
| `MAX_DAYS` | 7 | Days to keep daily backups |
| `HOURLY_RETENTION_HOURS` | 24 | Hours to keep hourly backups |

