Setup & Installation

Install Workspace Backup using the ClawHub CLI or OpenClaw CLI:

clawhub install workspace-backup

If the CLI is not installed:

npx clawhub@latest install workspace-backup

Or install with OpenClaw CLI:

openclaw skills install workspace-backup

View on ClawHub · View on GitHub

What This Skill Does

Workspace Backup is a Software Development skill for OpenClaw by aiwithabidi.

💾 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

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 {baseDir}/scripts/backup.sh

4. Schedule as cron job

In OpenClaw, create a cron job:

{
  "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

cd ~/.openclaw/workspace
git fetch origin
git reset --hard origin/main

Restore a specific file from history

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

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

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 | agxntsix.ai YouTube | GitHub Part of the AgxntSix Skill Suite for OpenClaw agents.

📅 Need help setting up OpenClaw for your business? Book a free consultation

Version History

Latest version: 1.0.0

First published: Mar 8, 2026. Last updated: Mar 8, 2026.

1 version released.

Frequently Asked Questions

Is Workspace Backup free to use?
Yes. Workspace Backup is a free, open-source skill available on the OpenClaw Skills Registry. You can install and use it at no cost, and the source code is publicly available for review and contribution.
What languages/platforms does Workspace Backup support?
It runs on any platform that supports OpenClaw, including macOS, Linux, and Windows. As long as you have the OpenClaw runtime installed, Workspace Backup will work seamlessly across operating systems.
How do I update Workspace Backup?
Run openclaw skills update workspace-backup to get the latest version. OpenClaw will download and apply the update automatically, preserving your existing configuration.
Can I use Workspace Backup with other skills?
Yes. OpenClaw skills are composable — you can combine Workspace Backup with any other installed skill in your workflows. This allows you to build powerful multi-step automations by chaining skills together.