Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

healthy-backup健康备份

Agent Skill

healthy-backup 用于辅助安全审计、权限检查和凭据风险排查,适合在 OpenClaw 中需要复核安全边界、认证流程或敏感配置时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

11,421

周安装

462

GitHub Stars

公开资料未说明

下载量

3,585
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:healthy-backup(健康备份)
来源仓库:https://github.com/littlejakub/healthy-backup
安装命令:
openclaw skills install healthy-backup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install healthy-backup

简介

OpenClaw 设备的健康门控备份解决方案,三层五版本保留策略。

  • 先进行系统健康检查再执行备份,保障数据完整性与一致性。
  • 可选 rclone 同步至远端存储,满足多地容灾需求。
  • 安装命令:openclaw skills install healthy-backup。
  • 敏感配置项需提前加密或排除,防止泄露关键凭证信息。

SKILL.md

name
healthy-backup
version
1.3.0
description
Health-gated backup for OpenClaw rigs. Audits first — only backs up if healthy. Three tiers, 5-backup retention, optional rclone sync. Sensitive config values scrubbed before staging. Linux/cron native.
metadata
{"openclaw":{"emoji":"🩺","requires":{"bins":["tar","gpg","jq","rsync"]}}}

Healthy Backup

Version: 1.3.0

A health-first backup skill for OpenClaw.

Before touching a single file, healthy-backup audits your rig. If anything critical is broken, it aborts with a clear report. No silent snapshots of a broken state.


How it works

  1. Health audit — checks required binaries, config integrity, key directories, disk space, encryption readiness, secrets file permissions, and optional rclone remote
  2. Hard block — any failing check aborts the backup immediately with a full report
  3. Stage — collects files for your chosen tier; secret-bearing paths are always excluded (see Secrets policy)
  4. Compress → Encrypt (AES256 GPG) → Save
  5. Prune — keeps the last N healthy backups; older archives are deleted
  6. Sync (optional) — pushes to your configured rclone remote

Run with --dry-run to execute the full audit and see exactly what would be staged — without writing anything.


Secrets policy (enforced in code)

openclaw.json — scrubbed before staging

openclaw.json is never copied verbatim. Before staging, the script uses jq walk() to replace the *value* of any field whose name contains password, token, secret, or key with "<redacted>". Config structure and all non-sensitive values are preserved. The live file on disk is never modified.

Recommendation: store your backup password in ~/.openclaw/credentials/backup.key (chmod 600) rather than inline in openclaw.json. The health audit will warn if an inline password is detected.

rsync exclusions — always applied, no config override

The following paths are hard-excluded from rsync at every tier:

~/.openclaw/shared/secrets/
~/.openclaw/credentials/
**/*.key  **/*.pem  **/*.env  **/*.secret  **/.env

Secrets manifest

At all tiers the script reads openclaw-secrets.env to extract variable *names* only — values are never written. The resulting secrets-manifest.txt lists what environment variables your rig expects, useful for rebuilding on a new machine.

GPG passphrase

Written to a chmod 600 temp file and passed to GPG via --passphrase-file — never on the CLI, never visible in ps. Deleted via trap EXIT on success or failure.


What this script reads

This section lists every file and system call the script makes, so there are no surprises:

WhatWhySensitive?
~/.openclaw/openclaw.jsonLoad config + stage (scrubbed copy)Sensitive fields redacted before staging
~/.openclaw/shared/secrets/openclaw-secrets.envExtract variable *names* for manifestValues never written; file never copied
~/.openclaw/credentials/backup.keyLoad encryption passwordRead into memory only; file excluded from rsync
~/.openclaw/ (migratable+)rsync to stagingSecrets paths hard-excluded
Workspace + skills dirs (full tier)rsync to stagingSecrets paths hard-excluded
command -v <bin>Check required binaries existNo
df -m $HOMECheck available disk spaceNo
ollama list (audit + opt-in manifest)Check models loaded / list for DEPENDENCIES.mdModel names only
npm list -g (opt-in, default off)List global packages for DEPENDENCIES.mdCan reveal installed tooling
crontab -l (opt-in, default off)List cron jobs for DEPENDENCIES.mdVAR=values redacted before writing
rclone listremotes (if uploadMode=rclone)Verify configured remote existsNo
rclone sync (if uploadMode=rclone)Upload encrypted archivesTransfers only *.gpg files

No network calls are made by the script itself beyond rclone when explicitly configured.


TierWhat's included
minimalopenclaw.json + secrets manifest (key names only)
migratableEverything in minimal + ~/.openclaw (secrets excluded) + DEPENDENCIES.md
fullEverything in migratable + workspace + skills (secrets excluded in all)

Default tier: migratable

DEPENDENCIES.md

Generated for migratable and full tiers. By default, only binary versions and OS info are collected. Sensitive system state (crontab, npm globals) requires explicit opt-in:

Config keyDefaultWhat it collects
collectOllamatrueInstalled Ollama model names
collectNpmfalsenpm list -g --depth=0 output
collectCrontabfalseCrontab — values after = are redacted before staging

Even when collectCrontab is enabled, any VAR=VALUE patterns in cron lines are replaced with VAR=<REDACTED> before the file is written.


Setup

1. Run the setup wizard

chmod +x setup.sh healthy-backup.sh verify-backup.sh
bash setup.sh

The wizard will ask about tier, backup location, retention, cloud sync, and optional collectors. It writes config to ~/.openclaw/config/healthy-backup/hb-config.json, creates your encryption key file if needed, runs a dry-run automatically, and optionally installs the cron job — all in one flow.

To reconfigure at any time, just run bash setup.sh again.

2. System dependencies

sudo apt install tar gpg jq rsync        # Debian/Ubuntu
sudo dnf install tar gpg jq rsync        # Fedora/RHEL

For rclone (only required when uploadMode = rclone):

# Preferred — package manager:
sudo apt install rclone    # Debian/Ubuntu
sudo dnf install rclone    # Fedora/RHEL

# Alternative — official binary. Download and inspect BEFORE running:
curl -fsSL https://rclone.org/install.sh -o rclone-install.sh
cat rclone-install.sh        # review it first
sudo bash rclone-install.sh
# Do NOT pipe curl directly to bash without reviewing the script.

These are OS-level binaries, listed in skill metadata for dependency checking only — not as npm packages.

2. Encryption password (choose one — in priority order)

# Recommended: key file with strict permissions
mkdir -p ~/.openclaw/credentials
echo "your-strong-password" > ~/.openclaw/credentials/backup.key
chmod 600 ~/.openclaw/credentials/backup.key

# Or: environment variable
export BACKUP_PASSWORD="your-strong-password"

# Or: inline in skill config (least preferred — see config section)

The health audit checks that backup.key has permissions 600 and will hard-fail if it does not.

3. Install the script

# Place wherever you keep scripts:
chmod +x /path/to/healthy-backup.sh

# Recommended: test run before scheduling — audits rig and shows what would be staged:
/path/to/healthy-backup.sh --dry-run

4. Schedule with cron (Linux)

crontab -e

Example — daily at 03:00:

0 3 * * * /path/to/healthy-backup.sh >> ~/.openclaw/logs/healthy-backup.log 2>&1

Configuration

All config lives in ~/.openclaw/openclaw.json under skills.entries["healthy-backup"].config.

{
  "skills": {
    "entries": {
      "healthy-backup": {
        "config": {
          "backupTier":       "migratable",
          "backupRoot":       "~/openclaw-backups",
          "uploadMode":       "local-only",
          "remoteDest":       "gdrive:openclaw-backups",
          "maxBackups":       5,
          "minDiskMb":        500,
          "collectOllama":    true,
          "collectNpm":       false,
          "collectCrontab":   false
        }
      }
    }
  }
}
Do not add a password field here. Although the script scrubs it from the backup copy, the value would still exist in your live openclaw.json on disk. Use ~/.openclaw/credentials/backup.key (chmod 600) instead — it is excluded from staging entirely.

### Full configuration reference

| Key | Env var | Default | Description |
|-----|---------|---------|-------------|
| `backupTier` | `BACKUP_TIER` | `migratable` | `minimal` / `migratable` / `full` |
| `backupRoot` | `BACKUP_ROOT` | `~/openclaw-backups` | Local backup storage directory |
| `uploadMode` | `UPLOAD_MODE` | `local-only` | `local-only` or `rclone` |
| `remoteDest` | `REMOTE_DEST` | _(none)_ | rclone destination e.g. `gdrive:backups` |
| `maxBackups` | `MAX_BACKUPS` | `5` | Healthy backups to retain |
| `minDiskMb` | `MIN_DISK_MB` | `500` | Minimum free disk (MB) required |
| `skillsDir` | `SKILLS_DIR` | `~/.openclaw/skills` | Skills directory |
| `collectOllama` | `COLLECT_OLLAMA` | `true` | Include Ollama model list in DEPENDENCIES.md |
| `collectNpm` | `COLLECT_NPM` | `false` | Include npm globals in DEPENDENCIES.md (opt-in) |
| `collectCrontab` | `COLLECT_CRONTAB` | `false` | Include sanitised crontab in DEPENDENCIES.md (opt-in) |
| `password` | `BACKUP_PASSWORD` | _(none)_ | ⚠ Discouraged — prefer key file; if set, value is scrubbed from backup copy but remains in live config |

**Priority:** Config file → Env var → Auto-detect

---

## Health checks

| Check | Behaviour |
|-------|-----------|
| Required binaries (`tar`, `gpg`, `jq`, `rsync`) | Hard fail |
| `rclone` present (if `uploadMode = rclone`) | Hard fail |
| `openclaw.json` is valid JSON | Hard fail |
| Key directories exist (OpenClaw dir, workspace) | Hard fail |
| Free disk ≥ `minDiskMb` | Hard fail |
| Encryption password available | Hard fail |
| `backup.key` permissions = 600 (if file exists) | Hard fail |
| Secrets file permissions = 600 (if file exists) | Hard fail |
| rclone remote reachable (if `uploadMode = rclone`) | Hard fail |
| Skills dir present | Warn only |
| Ollama models loaded | Warn only |
| No agents in config | Warn only |

---

## Archive contents

config/openclaw.json ← always present config/secrets-manifest.txt ← key names only, no values (migratable+) openclaw/ ← ~/.openclaw minus secrets paths (migratable+) workspace/ ← workspace minus secrets paths (full only) skills/ ← skills minus secrets paths (full only) DEPENDENCIES.md ← system snapshot (migratable+, opt-in fields) HEALTH_REPORT.txt ← full audit log from backup time


---

## Verifying the script

After downloading, verify the script has not been modified:

sha256sum healthy-backup.sh


Compare the output against the checksum published in the skill's release or provided by the author. The script also prints its own SHA256 on every successful run so you can confirm the installed version matches what ran.

---

## Restore

gpg --batch --passphrase-file /path/to/backup.key \ --decrypt healthy-backup-YYYYMMDD-HHMMSS-migratable.tgz.gpg \ | tar -xzf - -C /restore/target


---

## Security checklist

- [ ] `backup.key` exists and has `chmod 600`
- [ ] `openclaw-secrets.env` has `chmod 600`
- [ ] Backup root directory is not world-readable
- [ ] If using rclone cloud sync: prefer `rclone crypt` remote for an additional encryption layer
- [ ] Tested decryption of at least one archive before relying on backups
- [ ] `collectCrontab` and `collectNpm` left `false` unless you specifically need them

---

## Credits

Inspired by and building on:
- **simple-backup** by VACInc — GPG + rclone pattern, config resolution hierarchy
- **claw-backup** by vidarbrekke — tier thinking, dependency manifests, restore notes

---

## License

MIT

---

## Release checksums (v1.3.0)

Verify your downloaded files match these SHA256 hashes before running:

a8e0f8e922c05755a43a8bb156a327984d9fbc50a620ce08e172a48d72f79a39 healthy-backup.sh ae0bda0195e408aee84f441a39494995f8cd1eb5578eba07d0870810d6ad1433 verify-backup.sh 185fa27b052ed1c9d294f4d40a7700a501683906b0d6d2e75ab059532decbd4f setup.sh

sha256sum healthy-backup.sh verify-backup.sh setup.sh

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.76%
按下载量换算2,537

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills