当前位置: 首页 > Skill >

Complete Agent Backup

Complete Agent Backup

Complete Agent Backup

跨平台备份与恢复:为Hermes Agent和OpenClaw提供配置、记忆、技能、会话和工作空间的备份与恢复,支持可选加密。

1.0.0 2026.11.27 380
获取Skill文件查看使用说明
作 者:江辰 许可证: 更新时间:2026.11.27
本文目录展开

Hermes Backup

Universal backup and restore for AI agent platforms. Works with Hermes Agent and OpenClaw.

What Makes This Different

  • Multi-platform — Works with both Hermes (~/.hermes/) and OpenClaw (~/.openclaw/)
  • Optional encryption — Password-protect your backups (AES-256)
  • Optional cloud — Set up S3, Google Drive, or Dropbox if you want off-site storage
  • Flexible backups — Full or incremental, your choice
  • Smart retention — Keep last N backups, or N days, or max N GB
  • Integrity checking — Verify backups before trusting them
  • Web UI — Browser-based management with progress bars

Installation

# Via ClawMart (recommended)
clawmart install hermes-backup

# Or manual
git clone https://github.com/yourname/hermes-backup
chmod +x hermes-backup/scripts/*.sh

Quick Start

# Create your first backup
hermes-backup create

# Or with the agent
"Create a backup of my agent"

Commands

Command Description
hermes-backup create Create backup (full or incremental)
hermes-backup restore <file> Restore from backup
hermes-backup serve Start web UI
hermes-backup config Interactive configuration
hermes-backup cloud setup Configure cloud storage
hermes-backup list Show all backups
hermes-backup verify <file> Check backup integrity
hermes-backup schedule Set up automatic backups

What Gets Backed Up

Hermes Agent Structure

Component Path Contents
Config ~/.hermes/config.yaml All settings, API keys
Environment ~/.hermes/.env API keys, secrets
Identity ~/.hermes/SOUL.md Agent personality
Memory ~/.hermes/memories/ Long-term memories
Sessions ~/.hermes/sessions/ Conversation history
Skills ~/.hermes/skills/ Installed skills
State ~/.hermes/state.db Database
Workspace ~/.openclaw/workspace/ Cross-platform workspace

OpenClaw Structure

Component Path Contents
Config ~/.openclaw/openclaw.json Gateway, models, channels
Workspace ~/.openclaw/workspace/ Agent files, skills
Credentials ~/.openclaw/credentials/ Channel pairing state
Sessions ~/.openclaw/agents/main/sessions/ Chat history
Skills ~/.openclaw/skills/ System skills
Cron ~/.openclaw/cron/ Scheduled jobs

Configuration

Interactive Setup

hermes-backup config

This walks you through:

  1. Platform detection — Hermes or OpenClaw (auto-detected)
  2. Backup location — Where to save archives
  3. Encryption — Enable password protection? (optional)
  4. Backup type — Full or incremental?
  5. Retention — How many backups to keep?
  6. Cloud — Set up cloud storage? (optional)

Config File (~/.hermes-backup/config.yaml)

platform: auto  # auto, hermes, or openclaw

backup:
  location: ~/backups/hermes
  type: full  # full or incremental
  compression: gzip  # gzip, bzip2, or none
  encryption: false  # true/false
  
retention:
  strategy: count  # count, days, or size
  keep_count: 10   # keep last N backups
  keep_days: 30    # or keep for N days
  max_size_gb: 5   # or max total size

incremental:
  enabled: false
  base_backup: null  # reference full backup
  
cloud:
  enabled: false
  provider: null  # s3, gdrive, dropbox
  # Provider-specific settings added during setup
  
integrity:
  verify_after_backup: true
  checksum_algorithm: sha256

Creating Backups

Full Backup (Default)

hermes-backup create
# → ~/backups/hermes/hermes-backup_20260326_143022.tar.gz

Incremental Backup

# First, create a base backup
hermes-backup create --full --tag base-2026-03-26

# Then incremental backups reference the base
hermes-backup create --incremental --base base-2026-03-26

Encrypted Backup

hermes-backup create --encrypt
# Prompts for password (not echoed)

⚠️ Warning: If you lose the encryption password, the backup is unrecoverable. Store it in a password manager.

With Cloud Upload

hermes-backup create --cloud-upload
# Creates backup locally, then uploads to configured cloud storage

Restoring Backups

Standard Restore

# Always dry-run first
hermes-backup restore ~/backups/hermes/hermes-backup_20260326_143022.tar.gz --dry-run

# If it looks good, apply
hermes-backup restore ~/backups/hermes/hermes-backup_20260326_143022.tar.gz

Encrypted Restore

hermes-backup restore ~/backups/hermes/hermes-backup_20260326_143022.tar.gz.enc
# Prompts for password

Selective Restore

# Restore only specific components
hermes-backup restore backup.tar.gz --components workspace,skills

Cloud Storage Setup

Amazon S3

hermes-backup cloud setup s3

# Prompts for:
# - AWS Access Key ID
# - AWS Secret Access Key  
# - Bucket name
# - Region (optional, defaults to us-east-1)

Google Drive

hermes-backup cloud setup gdrive

# Opens browser for OAuth authentication
# Or provides manual token setup for headless

Dropbox

hermes-backup cloud setup dropbox

# OAuth flow or manual token

Testing Cloud Connection

hermes-backup cloud test
# Verifies credentials and uploads a test file

Scheduling Automatic Backups

Via Cron

hermes-backup schedule

# Interactive setup:
# - How often? (daily, weekly, hourly)
# - What time?
# - Full or incremental?
# - Cloud upload?

Manual Cron Entry

# Add to crontab
0 3 * * * /usr/local/bin/hermes-backup create --quiet --cloud-upload
# Daily at 3am, quiet mode, upload to cloud

Web UI

hermes-backup serve --port 7373 --token YOUR_TOKEN

# Opens browser UI at http://localhost:7373
# Features:
# - Create backups (click button)
# - Download backups
# - Upload and restore
# - View backup history
# - Configure settings
# - Progress bars for operations

Integrity Verification

# Verify a specific backup
hermes-backup verify ~/backups/hermes/hermes-backup_20260326_143022.tar.gz

# Check all backups
hermes-backup verify --all

# Results:
# ✓ Backup is valid and restorable
# ✗ Backup is corrupted or incomplete

Listing Backups

hermes-backup list

# Output:
# BACKUP NAME                           SIZE     DATE       TYPE   ENCRYPTED  CLOUD
# hermes-backup_20260326_143022.tar.gz  45MB     2026-03-26 full   no         yes
# hermes-backup_20260325_090015.tar.gz  2MB      2026-03-25 incr   yes        no

Migration Between Platforms

Hermes → OpenClaw

# On Hermes machine
hermes-backup create --platform hermes

# Transfer file to OpenClaw machine
scp backup.tar.gz user@newserver:~/

# On OpenClaw machine
hermes-backup restore backup.tar.gz --platform openclaw

OpenClaw → Hermes

Same process, reverse direction.

Security Considerations

Backup Archive Contents

Backups contain highly sensitive data:

  • API keys (OpenAI, Anthropic, ElevenLabs, etc.)
  • Bot tokens (Telegram, Discord, etc.)
  • Session data
  • Personal memories/conversations

Security Best Practices

  1. File Permissions

    • Backups created with chmod 600 (owner only)
    • Never chmod 777 a backup
  2. Storage

    • Keep local backups in encrypted disk/VeraCrypt
    • Cloud backups: use provider encryption at rest
    • Never commit backups to git
  3. Transmission

    • Use scp/sftp, not email
    • Cloud uploads use HTTPS
    • Web UI uses token authentication
  4. Encryption Password

    • Use a password manager (1Password, Bitwarden)
    • Minimum 12 characters
    • Mix of uppercase, lowercase, numbers, symbols
    • Never reuse passwords
  5. Rotation

    • Old backups may contain old API keys
    • Rotate API keys periodically
    • Delete backups older than needed

Troubleshooting

"Permission denied" on backup

# Check directory permissions
ls -la ~/backups/hermes/

# Fix
chmod 700 ~/backups/hermes/

"Backup is corrupted"

# Try to verify
hermes-backup verify backup.tar.gz

# If corrupted, check disk space
df -h

# Check for disk errors
fsck /dev/sda1  # (unmount first)

"Cloud upload failed"

# Test connection
hermes-backup cloud test

# Check credentials
hermes-backup cloud status

# Re-configure if needed
hermes-backup cloud setup s3

Restore fails halfway

# Auto-backup is created before restore
# Check /tmp/hermes-pre-restore-*.tar.gz

# Restore from auto-backup
hermes-backup restore /tmp/hermes-pre-restore_TIMESTAMP.tar.gz

Scripts Reference

scripts/backup.sh

Main backup script. Creates .tar.gz archive with MANIFEST.json.

scripts/restore.sh

Restores from archive. Always dry-runs first. Creates pre-restore backup.

scripts/serve.sh

Starts web UI server. Requires --token for security.

scripts/verify.sh

Verifies backup integrity using checksums.

scripts/cloud-upload.sh

Uploads backup to configured cloud storage.

scripts/config.sh

Interactive configuration wizard.

Version History

v1.0.0

  • Initial release
  • Multi-platform support (Hermes + OpenClaw)
  • Full and incremental backups
  • Optional encryption (AES-256)
  • Optional cloud storage (S3, Google Drive, Dropbox)
  • Web UI for browser-based management
  • Integrity verification
  • Flexible retention policies
  • Migration support between platforms

License

MIT-0 — Free to use, modify, and redistribute. No attribution required.

Built for the MyClaw.ai ecosystem — the open AI personal assistant platform.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • Hermes Backup
    • What Makes This Different
    • Installation
    • Quick Start
    • Commands
    • What Gets Backed Up
      • Hermes Agent Structure
      • OpenClaw Structure
    • Configuration
      • Interactive Setup
      • Config File (~/.hermes-backup/config.yaml)
    • Creating Backups
      • Full Backup (Default)
      • Incremental Backup
      • Encrypted Backup
      • With Cloud Upload
    • Restoring Backups
      • Standard Restore
      • Encrypted Restore
      • Selective Restore
    • Cloud Storage Setup
      • Amazon S3
      • Google Drive
      • Dropbox
      • Testing Cloud Connection
    • Scheduling Automatic Backups
      • Via Cron
      • Manual Cron Entry
    • Web UI
    • Integrity Verification
    • Listing Backups
    • Migration Between Platforms
      • Hermes → OpenClaw
      • OpenClaw → Hermes
    • Security Considerations
      • Backup Archive Contents
      • Security Best Practices
    • Troubleshooting
      • "Permission denied" on backup
      • "Backup is corrupted"
      • "Cloud upload failed"
      • Restore fails halfway
    • Scripts Reference
      • scripts/backup.sh
      • scripts/restore.sh
      • scripts/serve.sh
      • scripts/verify.sh
      • scripts/cloud-upload.sh
      • scripts/config.sh
    • Version History
      • v1.0.0
    • License
  • 项目或源文件

相关 Skill

更多
Agent优化专家 Agent优化专家 Agent 优化专家 — 自动诊断和修复 Agent 执行问题(Cron 失败、工具报错、工作流中断、性能退化), 兼容 OpenClaw 和 Hermes Agent,自带持续自我进化能力。 Use when user asks to 系统诊断、修复 cron、优化配置、检查系统健康度、自愈修复、 诊断失败原因...
Active Defense Sentinal Active Defense Sentinal 用于OpenClaw、Hermes Agent、主机完整性以及OpenClaw技能供应链扫描的防御分诊技能。检测提示注入、会话漂移、上下文异常。
zeelin-social-autopublisher zeelin-social-autopublisher ZeeLin 四平台自运营 — THUQXAutoOps for OpenClaw 0.5(Twitter、微博、小红书、微信公众号草稿)。支持 Hermes agent 风格的参数化编排、dry‑run、生成结构化 JSON 报告并落盘;需已登录各平台。
Hermes Deployer Hermes Deployer 在 Linux 服务器上安装、配置、部署和运维 Hermes Agent(Nous Research 出品的自我改进 AI Agent),触发词:hermes、hermes agent、部署 hermes、安装 hermes、hermes gateway、hermes 运维、hermes 排障、hermes 配置。
Skill Package Doctor Skill Package Doctor 在发布前审计 Claude、Codex、OpenClaw 和 ClawHub 技能包;生成具体修复清单、信任评分和可共享的证据卡片。