360 Secure SkillHub
360 安全技能中心

openclaw configure backup

该 Skill 提供脚本备份 OpenClaw 配置文件:先对 JSON5 文件做校验,再计算 SHA256 哈希,与上次备份比较,未变化则跳过,变化则生成带时间戳的备份文件,可用 -o 指定备份目录。

goog
goog
热度 44.30
最近更新 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