360 Secure SkillHub
360 安全技能中心

Backup To Telnyx Storage

核心功能为备份、恢复、列出OpenClaw工作区的关键文件及目录至S3兼容的Telnyx Storage,支持自定义存储桶、工作区路径,设置备份保留数量,还可通过定时任务自动备份。典型场景是OpenClaw用户定期备份工作区数据、恢复历史版本。采用CLI命令操作,输入命令及可选参数即可,输出直观的操作状态与备份列表。推荐使用无额外依赖的shell脚本,也提供兼容AWS SDK的Python脚本备选。

teamtelnyx
teamtelnyx
热度 68.41
最近更新 2026-05-11 16:09:51
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 数据处理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add telnyx-storage-backup
Metadata
name
backup-to-telnyx-storage
description
Backup and restore your OpenClaw workspace to Telnyx Storage. Simple CLI-based scripts with no external dependencies.
metadata
{"openclaw":{"emoji":"💾","requires":{"bins":["telnyx"],"env":["TELNYX_API_KEY"]},"primaryEnv":"TELNYX_API_KEY"}}

Backup to Telnyx Storage

Backup and restore your OpenClaw workspace to Telnyx Storage (S3-compatible).

Setup (One-Time)

# 1. Install Telnyx CLI (if not already)
npm install -g @telnyx/api-cli

# 2. Authenticate
telnyx auth setup

That's it. No boto3, no AWS credentials, no environment variables.

Usage

Backup

./backup.sh

# Output:
# 🔄 OpenClaw Backup → Telnyx Storage
# ========================================
# Creating archive: openclaw-backup-20260201-120000.tar.gz
#   + MEMORY.md
#   + SOUL.md
#   + memory/
# ✅ Backup complete: openclaw-backup/openclaw-backup-20260201-120000.tar.gz

Custom bucket and workspace:

./backup.sh my-bucket ~/my-workspace

Control backup retention (default: 48, ~24h of 30-min backups):

MAX_BACKUPS=100 ./backup.sh

List Backups

./list.sh

# Output:
# 📋 Available Backups
# ========================================
# Bucket: openclaw-backup
#
#   • openclaw-backup-20260201-120000.tar.gz  1.2M  2/1/2026
#   • openclaw-backup-20260131-180000.tar.gz  1.1M  1/31/2026

Restore

# Restore latest backup
./restore.sh latest

# Restore specific backup
./restore.sh openclaw-backup-20260201-120000.tar.gz

# Restore to different location
./restore.sh latest my-bucket ~/restored-workspace

What Gets Backed Up

  • AGENTS.md, SOUL.md, USER.md, IDENTITY.md, TOOLS.md
  • MEMORY.md, HEARTBEAT.md, GUARDRAILS.md
  • memory/, knowledge/, scripts/

Scheduling

Automatic backups every 30 minutes:

crontab -e
# Add:
*/30 * * * * ~/skills/backup-to-telnyx-storage/backup.sh >> /tmp/backup.log 2>&1

Pricing

Telnyx Storage: $0.023/GB/month — typical workspace costs pennies.

Legacy Python Script

The original backup.py using boto3 is still available if you need AWS SDK compatibility:

pip install boto3
export TELNYX_API_KEY=KEYxxxxx
python3 backup.py

Note: The CLI-based scripts (backup.sh, list.sh, restore.sh) are recommended as they require no additional dependencies and provide full backup/list/restore functionality.