backup-openclaw-config

Backup and restore OpenClaw configuration files. Use when backing up OpenClaw settings before upgrades, transferring configuration to another machine, restoring from a previous backup, or preparing for system maintenance.

3,891 stars

Best use case

backup-openclaw-config is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Backup and restore OpenClaw configuration files. Use when backing up OpenClaw settings before upgrades, transferring configuration to another machine, restoring from a previous backup, or preparing for system maintenance.

Teams using backup-openclaw-config should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/backup-openclaw-config/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/alexjunanjing-2/backup-openclaw-config/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/backup-openclaw-config/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How backup-openclaw-config Compares

Feature / Agentbackup-openclaw-configStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Backup and restore OpenClaw configuration files. Use when backing up OpenClaw settings before upgrades, transferring configuration to another machine, restoring from a previous backup, or preparing for system maintenance.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Backup OpenClaw Configuration

## Overview

This skill provides automated backup and restore functionality for all OpenClaw configuration files. It creates timestamped archives containing your complete OpenClaw setup, including main configuration, workspace, skills, and user data.

**What gets backed up:**
- `~/.openclaw/` - Main configuration
- `~/.config/openclaw/` - System-level configuration
- `~/.local/share/openclaw/` - Local data
- `~/.openclaw/workspace/` - Workspace, skills, and memory

## Quick Start

### Backup Your Configuration

Run the backup script:

```bash
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh [output-directory]
```

**Example:**
```bash
# Backup to default location ($HOME/backups/openclaw)
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh

# Backup to custom location
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh ~/my-backups
```

**Output:**
- Creates `openclaw_backup_YYYYMMDD_HHMMSS.tar.gz` archive
- Creates `openclaw_backup_YYYYMMDD_HHMMSS.info` metadata file
- Shows backup summary with file list and archive size
- **Automatically deletes backups older than 15 days** to manage disk space

### Restore from Backup

Run the restore script:

```bash
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh <backup-archive.tar.gz>
```

**Example:**
```bash
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh \
  ~/backups/openclaw/openclaw_backup_20260306_095000.tar.gz
```

**Process:**
1. Shows backup information from .info file
2. Lists all files that will be restored
3. Requires confirmation before proceeding
4. Backs up existing files with .bak extension
5. Restores configuration to original locations

**After restore:**
```bash
# Restart OpenClaw Gateway to apply changes
systemctl --user restart openclaw-gateway
```

## Workflow

### Backup Workflow

1. **Check prerequisites**
   - Verify backup directory exists or can be created
   - Check if OpenClaw directories exist

2. **Create backup structure**
   - Generate timestamp for unique backup name
   - Create temporary directory for staging

3. **Copy configuration files**
   - Backup `~/.openclaw/` (main config)
   - Backup `~/.config/openclaw/` (system config)
   - Backup `~/.local/share/openclaw/` (local data)
   - Skip directories that don't exist (with warning)

4. **Create archive**
   - Compress all files into `.tar.gz` archive
   - Create `.info` file with metadata (timestamp, hostname, user, size)

5. **Report results**
   - Show archive location and size
   - Display restore command
   - Warn if any directories were missing

### Restore Workflow

1. **Validate backup**
   - Check if archive file exists
   - Display backup information from .info file
   - List contents of archive

2. **Safety confirmation**
   - Show warning about overwriting current config
   - List all files that will be restored
   - Require explicit "yes" confirmation

3. **Backup existing files**
   - Rename existing directories to `.bak`
   - Preserve current configuration before overwriting

4. **Extract and restore**
   - Extract archive to temporary directory
   - Move files to original locations
   - Restore `~/.openclaw/`, `~/.config/openclaw/`, `~/.local/share/openclaw/`

5. **Complete and notify**
   - Show restore completion message
   - Display restart command for Gateway
   - Note that .bak files were created

## Use Cases

### Before Upgrade

```bash
# Backup before updating OpenClaw
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh

# Then upgrade
openclaw update
```

### Transfer to New Machine

```bash
# On old machine: create backup
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/backup_openclaw.sh

# Transfer backup archive to new machine (scp, rsync, etc.)
scp ~/backups/openclaw/openclaw_backup_*.tar.gz user@new-machine:~/

# On new machine: restore
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh \
  ~/backups/openclaw/openclaw_backup_*.tar.gz
```

### Disaster Recovery

```bash
# Restore from backup after system failure
~/.openclaw/workspace/skills/backup-openclaw-config/scripts/restore_openclaw.sh \
  /path/to/backup/openclaw_backup_20260306.tar.gz

# Restart services
systemctl --user restart openclaw-gateway
```

## Configuration Locations

For detailed information about what gets backed up, see [config-locations.md](references/config-locations.md).

**Summary:**
- **Main config:** `~/.openclaw/` - Gateway config, extensions, tokens
- **Workspace:** `~/.openclaw/workspace/` - Skills, memory, user data
- **System config:** `~/.config/openclaw/` - systemd services, preferences
- **Local data:** `~/.local/share/openclaw/` - Cache, runtime data

## Best Practices

### Regular Backups

Create backups regularly, especially after:
- Installing new skills
- Modifying configuration
- Adding extensions
- Important workspace changes

### Secure Storage

- Backup archives contain sensitive data (tokens, credentials)
- Store backups in secure location
- Consider encrypting with gpg for sensitive environments
- Don't share backup archives publicly

### Testing Backups

After creating a backup, verify it:
```bash
# Test extraction to temporary location
tar -tzf backup.tar.gz | head

# Verify critical files are present
tar -tzf backup.tar.gz | grep -E "(config.json|AGENTS.md|MEMORY.md)"
```

## Troubleshooting

### Permission Denied

If you see permission errors:
```bash
# Ensure scripts are executable
chmod +x ~/.openclaw/workspace/skills/backup-openclaw-config/scripts/*.sh

# Ensure backup directory is writable
mkdir -p ~/backups/openclaw
chmod 755 ~/backups/openclaw
```

### Gateway Won't Start After Restore

If Gateway fails to start after restore:
```bash
# Check Gateway logs
journalctl --user -u openclaw-gateway -n 50

# Restore from .bak if needed
mv ~/.openclaw ~/.openclaw.bad
mv ~/.openclaw.bak ~/.openclaw

systemctl --user restart openclaw-gateway
```

### Missing Directories

The backup script gracefully handles missing directories:
- Skips directories that don't exist
- Shows warning for each missing directory
- Still creates valid backup with available data

Related Skills

openclaw-youtube

3891
from openclaw/skills

YouTube SERP Scout for agents. Search top-ranking videos, channels, and trends for content research and competitor tracking.

Content & Documentation

openclaw-search

3891
from openclaw/skills

Intelligent search for agents. Multi-source retrieval with confidence scoring - web, academic, and Tavily in one unified API.

Data & Research

openclaw-media-gen

3891
from openclaw/skills

Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.

Content & Documentation

OpenClaw Mastery — The Complete Agent Engineering & Operations System

3891
from openclaw/skills

> Built by AfrexAI — the team that runs 9+ production agents 24/7 on OpenClaw.

DevOps & Infrastructure

openclaw-safe-change-flow

3891
from openclaw/skills

Safe OpenClaw config change workflow with backup, minimal edits, validation, health checks, and rollback. Single-instance first; secondary instance optional.

DevOps & Infrastructure

jqopenclaw-node-invoker

3891
from openclaw/skills

统一通过 Gateway 的 node.invoke 调用 JQOpenClawNode 能力(file.read、file.write、process.exec、process.manage、system.run、process.which、system.info、system.screenshot、system.notify、system.clipboard、system.input、node.selfUpdate)。当用户需要远程文件读写、文件移动/删除、目录创建/删除、进程管理(列表/搜索/终止)、远程进程执行、命令可执行性探测、系统信息采集、截图采集、系统弹窗、系统剪贴板读写、输入控制(鼠标/键盘)、节点自更新、节点命令可用性排查或修复 node.invoke 参数错误时使用。

DevOps & Infrastructure

openclaw-stock-skill

3891
from openclaw/skills

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Data & Research

openclaw-whatsapp

3891
from openclaw/skills

WhatsApp bridge for OpenClaw — send/receive messages, auto-reply agents, QR pairing, message search, contact sync

Workflow & Productivity

polymarket-openclaw-trader

3891
from openclaw/skills

Reusable Polymarket + OpenClaw trading operations skill for any workspace. Use when the user needs to set up, run, tune, monitor, and deploy an automated Polymarket trading project (paper/live), including env configuration, risk controls, reporting, and dashboard operations.

Trading Automation

openclaw-version-monitor

3891
from openclaw/skills

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Workflow & Productivity

openclaw-essesseff

3891
from openclaw/skills

Interact with the essesseff DevOps platform — call the essesseff Public API (templates, organizations, apps, deployments, images, image lifecycle, environments, retention policies, packages) and automate app creation and Argo CD setup using the essesseff onboarding utility. Use when the user wants to create essesseff apps, manage deployments, promote images through the DEV→QA→STAGING→PROD lifecycle, configure Argo CD environments, manage retention policies, or run the essesseff-onboard.sh script.

Agent World Protocol — OpenClaw Skill

3891
from openclaw/skills

Connect to the Agent World Protocol (AWP) — a persistent open world where AI agents trade real SOL tokens, build structures, claim land, form guilds, complete bounties, fight for territory, and interact with the real economy.