High Risk:This skill has significant security concerns. Review the findings below before installing.

openclaw-backup-optimized

Caution·Scanned 2/17/2026

High-risk backup skill that archives ~/.openclaw, splits workspace.tar.gz into parts, and can push backups to https://github.com/your/repo.git. It runs shell commands (git, openclaw, node) and reads env vars such as BACKUP_REPO_URL and BACKUP_CHANNEL_ID, enabling external upload of user data.

from clawhub.ai·ve3493d3·14.9 KB·0 installs
Scanned from 1.0.1 at e3493d3 · Transparency log ↗
$ vett add clawhub.ai/cccarv82/openclaw-backup-optimizedReview security findings before installing

OpenClaw Backup (Optimized)

What this skill does

Use this skill to install, configure, and run the optimized OpenClaw backup workflow:

  • Full snapshot of ~/.openclaw
  • Workspace archive split into ~90MB parts + SHA256
  • Rich Discord notification (summary + restore steps)
  • Retention of last N reports

Files

  • Script: scripts/backup.js (cross-platform)
  • Reference config: references/CONFIG.md

Install / Setup

  1. Copy the script into your tools folder:
cp scripts/backup.js ~/.openclaw/workspace/tools/openclaw-backup.js
  1. Configure env vars (see references/CONFIG.md):

macOS/Linux (bash/zsh):

export OPENCLAW_HOME="$HOME/.openclaw"
export OPENCLAW_BACKUP_DIR="$HOME/.openclaw-backup"
export BACKUP_REPO_URL="https://github.com/your/repo.git"
export BACKUP_CHANNEL_ID="1234567890"
export BACKUP_TZ="America/Sao_Paulo"
export BACKUP_MAX_HISTORY=7

Windows (PowerShell):

$env:OPENCLAW_HOME="$env:USERPROFILE\.openclaw"
$env:OPENCLAW_BACKUP_DIR="$env:USERPROFILE\.openclaw-backup"
$env:BACKUP_REPO_URL="https://github.com/your/repo.git"
$env:BACKUP_CHANNEL_ID="1234567890"
$env:BACKUP_TZ="America/Sao_Paulo"
$env:BACKUP_MAX_HISTORY="7"
  1. Run once:
node ~/.openclaw/workspace/tools/openclaw-backup.js
  1. Create cron (OpenClaw cron runs in the gateway environment):
openclaw cron add --name "openclaw-backup-daily" \
  --cron "0 5,10,15,20 * * *" --tz "America/Sao_Paulo" \
  --exec "node ~/.openclaw/workspace/tools/openclaw-backup.js"

Restore

Use the restore instructions printed in the backup notification.

Notes

  • Excludes noisy session lock/deleted files for smaller diffs.
  • Requires git and node (>=18).
  • Uses openclaw message send for notifications (no webhook).
  • scripts/openclaw-backup.sh is legacy (Linux/macOS) and will be removed; use backup.js.