← 返回
未分类

Pilot Backup

Automated backup of agent state to trusted peers with encryption and versioning. Use this skill when: 1. You need to backup agent configuration and state fil...
自动将代理状态加密并版本化备份至受信任节点。使用此技能的场景:1. 需要备份代理配置和状态文件时...
teoslayer
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 334
下载
💾 0
安装
1
版本
#latest

概述

pilot-backup

Automated backup of agent configuration and state files to trusted peers with encryption and versioning.

Commands

Backup Agent State

BACKUP_DEST="1:0001.AAAA.BBBB"
BACKUP_FILE="/tmp/pilot-backup-$(date +%Y%m%d_%H%M%S).tar.gz"

tar czf "$BACKUP_FILE" "$HOME/.pilot"/*.json
pilotctl --json send-file "$BACKUP_DEST" "$BACKUP_FILE"
rm "$BACKUP_FILE"

Restore from Backup

pilotctl --json send-message "$BACKUP_PEER" --data '{"type":"backup_request","date":"latest"}'
sleep 3

BACKUP_FILE=$(pilotctl --json received | jq -r '.received[0].filename')
tar xzf "$HOME/.pilot/received/$BACKUP_FILE" -C "$HOME/.pilot/"

Backup Rotation

BACKUP_STORAGE="$HOME/.pilot/backup-storage"
MAX_BACKUPS=7

ls -1t "$BACKUP_STORAGE"/pilot-backup-*.tar.gz | tail -n +$((MAX_BACKUPS + 1)) | xargs rm -f

Workflow Example

#!/bin/bash
# Automated backup management

BACKUP_STORAGE="$HOME/.pilot/backup-storage"
MAX_BACKUPS=7

mkdir -p "$BACKUP_STORAGE"

create_backup() {
  local dest="$1"
  local backup_file="/tmp/pilot-backup-$(date +%Y%m%d_%H%M%S).tar.gz"

  tar czf "$backup_file" "$HOME/.pilot"/*.json

  pilotctl --json send-file "$dest" "$backup_file"
  cp "$backup_file" "$BACKUP_STORAGE/"
  rm "$backup_file"

  # Rotate old backups
  ls -1t "$BACKUP_STORAGE"/pilot-backup-*.tar.gz | tail -n +$((MAX_BACKUPS + 1)) | xargs rm -f
}

create_backup "1:0001.AAAA.BBBB"

Dependencies

Requires pilot-protocol, pilotctl, jq, and tar/gzip.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 20:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Pilot Api Gateway

teoslayer
将本地 API 暴露到 Pilot 协议网络。适用场景:1. 需要向远程 Pilot 代理暴露本地 API;2. 想提供 API 访问。
★ 0 📥 440

Pilot Task Parallel

teoslayer
将任务分发给多个代理并合并结果。适用场景:1. 需要将独立工作分配给多个代理;2. 希望汇总各代理的结果。
★ 0 📥 452

Pilot Priority Queue

teoslayer
基于Pilot协议网络的优先级消息传递,支持紧急程度级别。适用场景:1. 需要处理带优先级的紧急消息...
★ 0 📥 448