360 Secure SkillHub
360 安全技能中心

openclaw configure backup

核心功能含JSON5验证、SHA256哈希变更检测(无变更自动跳过)、时间戳命名备份、自定义备份目录。适用于用户备份OpenClaw的openclaw.json配置场景,通过命令行指定文件路径及可选输出目录,输出备份文件或无变更提示。

goog
goog
热度 44.29
最近更新 2026-05-11 17:33:53
分类:自动化依赖:代码执行应用场景:自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add claw-config-backup
Metadata
name
clawbackup
description
Backup OpenClaw configuration file with hash-based change detection. Use when user asks to backup, create backup of, or save OpenClaw config (openclaw.json). Automatically skips backup if file hasn't changed.

Clawbackup

Backup OpenClaw configuration file with automatic change detection.

Quick Start

Backup Config

From workspace directory:

python config_backup.py ..\openclaw.json

Or with custom backup directory:

python config_backup.py ..\openclaw.json -o backup

Features

  • JSON5 Validation: Validates config file before backup
  • Hash-based Change Detection: Skips backup if file hasn't changed (compares SHA256 hash)
  • Timestamped Backups: Creates backups with timestamp format: openclaw_20260319_143052_123456.json
  • Custom Output Directory: Specify backup location with -o flag

Script Location

The script is located in "scripts" directory

Usage

usage: config_backup.py [-h] [-o OUTPUT] file

Validate JSON5 and backup with hash check

positional arguments:
  file                  JSON5 file path

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output   Backup directory (default: backup)

Example Output

✅ JSON5 validate passed
📦 已备份: backup\openclaw_20260319_143052_123456.json

If file unchanged:

✅ JSON5 validate passed
⚠️ config file unchange, skip backup