skbylife

openclaw-backup

0
0
# Install this skill:
npx skills add skbylife/claw-skills --skill "openclaw-backup"

Install specific skill from multi-skill repository

# Description

Backup and restore OpenClaw data. Use when user asks to create backups, set up automatic backup schedules, restore from backup, or manage backup rotation. Handles ~/.openclaw directory archiving with proper exclusions.

# SKILL.md


name: openclaw-backup
description: Backup and restore OpenClaw data. Use when user asks to create backups, set up automatic backup schedules, restore from backup, or manage backup rotation. Handles ~/.openclaw directory archiving with proper exclusions.


OpenClaw Backup

Backup and restore OpenClaw configuration, credentials, and workspace.

Create Backup

Run the backup script:

./scripts/backup.sh [backup_dir]

Default backup location: ~/openclaw-backups/

Output: openclaw-YYYY-MM-DD_HHMM.tar.gz

What Gets Backed Up

  • openclaw.json β€” main config
  • credentials/ β€” API keys, tokens
  • agents/ β€” agent configs, auth profiles
  • workspace/ β€” memory, SOUL.md, user files
  • telegram/ β€” session data
  • cron/ β€” scheduled tasks

Excluded

  • completions/ β€” cache, regenerated automatically
  • *.log β€” logs

Setup Daily Backup with Cron

Use OpenClaw cron for daily backups with notification:

{
  "name": "daily-backup",
  "schedule": {"kind": "cron", "expr": "0 3 * * *", "tz": "UTC"},
  "payload": {
    "kind": "agentTurn",
    "message": "Run ~/.openclaw/backup.sh and report result to user."
  },
  "sessionTarget": "isolated",
  "delivery": {"mode": "announce"}
}

Restore

See references/restore.md for step-by-step restore instructions.

Quick restore:

openclaw gateway stop
mv ~/.openclaw ~/.openclaw-old
tar -xzf ~/openclaw-backups/openclaw-YYYY-MM-DD_HHMM.tar.gz -C ~
openclaw gateway start

Rotation

Script keeps last 7 backups automatically.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.