Skip to content
Back to skills

Workspace Backup

ASecurity

Automated workspace backup to GitHub — git-based with auto-generated commit messages, proper .gitignore, and restore procedures. Cron-friendly for hands-free backup. Use for backing up your OpenClaw workspace, skills, memory, and configuration.

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
developmentpythonbashnodegitdatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill workspace-backup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workspace Backup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Workspace Backup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-workspace-backup/badge)](https://www.skillsdirectory.com/skills/dvcrn-workspace-backup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: workspace-backup
description: "Automated workspace backup to GitHub — git-based with auto-generated commit messages, proper .gitignore, and restore procedures. Cron-friendly for hands-free backup. Use for backing up your OpenClaw workspace, skills, memory, and configuration."
homepage: https://www.agxntsix.ai
---

# 💾 Workspace Backup

Automated git-based backup of your OpenClaw workspace to GitHub. Designed to run as a cron job or on-demand.

## Features

- One-command backup with auto-generated commit messages
- Smart `.gitignore` for OpenClaw workspaces
- Timestamp + changed files summary in commits
- Restore from any point in history
- Cron-friendly (no TTY required)

## Setup

### 1. Initialize the backup repo

```bash
cd ~/.openclaw/workspace
git init
git remote add origin git@github.com:YOUR_USER/YOUR_REPO.git
```

### 2. Ensure SSH keys are configured

The script uses SSH for push. Make sure your deploy key or SSH key is available.

### 3. Run the backup

```bash
bash {baseDir}/scripts/backup.sh
```

### 4. Schedule as cron job

In OpenClaw, create a cron job:

```json
{
  "name": "workspace-backup",
  "schedule": "0 */6 * * *",
  "command": "bash /home/node/.openclaw/workspace/skills/workspace-backup/{baseDir}/scripts/backup.sh",
  "description": "Backup workspace to GitHub every 6 hours"
}
```

Or via system crontab:
```
0 */6 * * * cd /home/node/.openclaw/workspace && bash skills/workspace-backup/{baseDir}/scripts/backup.sh >> /tmp/backup.log 2>&1
```

## Restore Procedures

### Restore entire workspace to latest backup
```bash
cd ~/.openclaw/workspace
git fetch origin
git reset --hard origin/main
```

### Restore a specific file from history
```bash
git log --oneline -- path/to/file          # find the commit
git checkout <commit-hash> -- path/to/file  # restore it
```

### Restore to a specific point in time
```bash
git log --oneline --before="2026-02-01"    # find commit near that date
git checkout <commit-hash>                  # detached HEAD at that point
# Copy what you need, then: git checkout main
```

### View what changed between backups
```bash
git log --oneline -10
git diff <older-hash> <newer-hash> --stat
```

## .gitignore

The backup script auto-creates a `.gitignore` if missing, excluding:

- `.venv/` — Python virtual environments
- `.data/` — Local databases and data files
- `.env` — Secret environment variables
- `node_modules/` — Node.js dependencies
- `__pycache__/` — Python bytecode
- `*.pyc` — Compiled Python files
- `.DS_Store` — macOS metadata

## Script Reference

| Script | Description |
|--------|-------------|
| `{baseDir}/scripts/backup.sh` | Main backup script — add, commit, push |

## Credits
Built by [M. Abidi](https://www.linkedin.com/in/mohammad-ali-abidi) | [agxntsix.ai](https://www.agxntsix.ai)
[YouTube](https://youtube.com/@aiwithabidi) | [GitHub](https://github.com/aiwithabidi)
Part of the **AgxntSix Skill Suite** for OpenClaw agents.

📅 **Need help setting up OpenClaw for your business?** [Book a free consultation](https://cal.com/agxntsix/abidi-openclaw)

Files in this skill

  • SKILL.md3 KB
  • scripts/backup.sh1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…