---
name: backup
description: Backs up the project workspace. Creates a zip (excluding node_modules, .git, and other heavy content) and uploads it to your configured backup destination. Run at end of day or as part of closeout.
user_invocable: true
---

# Workspace Backup

Run the backup script to zip and upload the workspace:

```bash
bash "$CLAUDE_PROJECT_DIR/.claude/hooks/backup-vault.sh"
```

Before first use, edit `.claude/hooks/backup-vault.sh` and configure ONE backup destination:
- **Option 1:** Local directory (set `BACKUP_DEST`)
- **Option 2:** Cloud storage via rclone (set `RCLONE_REMOTE` and `RCLONE_FOLDER`)

**What's backed up** (everything NOT on GitHub):
- Session logs, handoffs, agent reports
- `.claude/` configuration (agents, skills, hooks)
- Learning system files (`agent-learnings/`)
- Scripts (vault-search.py, etc.)
- All project files not in .gitignore

**What's excluded** (already on GitHub or regenerable):
- node_modules/
- .git/
- .vault-search/ index (rebuilds automatically)
- dist/, build/, .next/
- .DS_Store, .pyc, __pycache__
