OpenClaw Backup Rclone

v1.0.0

自动备份 OpenClaw 整体配置到远程存储(支持任意 rclone 后端:COS、S3、FTP、SFTP、WebDAV等)。 触发场景: - 创建/配置自动备份任务 - 设置备份周期、保留份数、目标目录 - 手动触发备份 - 查看/恢复备份 - OpenClaw 运行异常时的提醒

0· 153·0 current·0 all-time
byDorad@doradx·duplicate of @doradx/clw-openclaw-backup

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for doradx/openclaw-backup-rclone.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "OpenClaw Backup Rclone" (doradx/openclaw-backup-rclone) from ClawHub.
Skill page: https://clawhub.ai/doradx/openclaw-backup-rclone
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install openclaw-backup-rclone

ClawHub CLI

Package manager switcher

npx clawhub@latest install openclaw-backup-rclone
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description promise (backup OpenClaw config to arbitrary rclone backends) aligns with included script and SKILL.md. The script operates on /root/.openclaw and uses rclone for upload/rotation, which is exactly what a backup tool would do.
Instruction Scope
Instructions and script perform only backup-related actions (status check, tar up selected directories, rclone copy, remote rotation). However the documented default behavior includes backing up credentials/ memory/agents and other sensitive files — this is expected for a full backup but is a privacy/security risk the user must accept or opt out of (the script provides flags to exclude).
Install Mechanism
No install spec; this is an instruction + script skill that relies on existing rclone and openclaw CLI binaries. No remote downloads or package installs are performed by the skill itself.
Credentials
The skill requests no environment variables, which is proportional. It does require filesystem access to /root/.openclaw (to read credentials and other sensitive data) and network access via rclone to whichever remote the operator supplies. SKILL.md examples show passing access_key_id/secret on the command line — an insecure practice that can leak secrets via shell history or process listing; the script itself does not exfiltrate data to unknown endpoints.
Persistence & Privilege
always is false and the skill is user-invocable. It does not modify other skills or global agent settings. The user may add the script to cron (documented) which is normal for backups and not a platform privilege escalation.
Assessment
This skill appears to do what it claims, but it will read and upload sensitive OpenClaw files (including credentials/ memory/agents) to whatever rclone remote you specify. Before installing: (1) ensure you trust the remote storage and use encryption (rclone crypt / server-side encryption), (2) avoid putting access keys on the command line or in crontab — prefer interactive rclone config or secure storage, (3) if you don't want secrets backed up, run the script with --include-credentials=false (and test with --check-only), (4) run the backup under an account with least privilege and review resulting backups to confirm no unwanted data was included, and (5) keep rclone and openclaw CLI up to date. If you need, request the author to add explicit warnings/confirmation before including credentials and to support encrypted backups by default.

Like a lobster shell, security has layers — review code before you run it.

latestvk977fjd2zpbvej41jfecn19tz183ppem
153downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

OpenClaw 自动备份

功能特性

  • ✅ 状态检查:异常时自动停止备份并提醒
  • ✅ 完整备份:配置文件、skills、agents、workspace、memory、credentials
  • ✅ 备份轮转:自动保留最新 N 份,删除旧备份
  • ✅ 任意存储:支持 rclone 所有后端(S3/COS/FTP/SFTP/WebDAV等)
  • ✅ 定时任务:支持 cron 定时自动备份

快速开始

1. 配置 rclone 远程存储(如已有可跳过)

# 查看现有配置
rclone listremotes

# 添加新配置(如腾讯COS)
rclone config create tencentcos s3 provider TencentCOS \
  access_key_id 你的AKID \
  secret_access_key 你的KEY \
  endpoint cos.ap-shanghai.myqcloud.com

# 添加其他存储(如S3、FTP等)
rclone config create mybackup s3 provider AWS access_key_id xxx secret_access_key xxx
rclone config create myftp ftp host ftp.example.com user myuser password mypass

2. 执行备份

/root/.openclaw/workspace-main/skills/openclaw-backup/scripts/backup.sh \
  --remote tencentcos:backup-1252695297/openclaw-backup \
  --keep 7

3. 配置定时任务

crontab -e
# 每天凌晨3点自动备份
0 3 * * * /root/.openclaw/workspace-main/skills/openclaw-backup/scripts/backup.sh \
  --remote tencentcos:backup-1252695297/openclaw-backup \
  --keep 7 >> /var/log/openclaw-backup.log 2>&1

备份内容

目录/文件说明默认
openclaw.json主配置文件
openclaw.json.bak*配置文件历史
skills/技能目录 (48个)
agents/Agent配置 (6个)
workspace*工作空间 (5个)
memory/全局记忆
credentials/密钥凭证
config-backups/配置备份
extensions/插件扩展❌ (太大)

配置参数

参数必填默认值说明
--remote-rclone 远程路径,格式:remote:bucket/folder
--keep-7保留的备份份数
--include-memory-true是否包含 memory/
--include-config-true是否包含配置文件和 skills
--include-workspace-true是否包含所有 workspace
--include-credentials-true是否包含 credentials
--include-agents-true是否包含 agents
--include-extensions-false是否包含 extensions(约836MB)
--check-only-false仅检查状态,不执行备份

常用示例

腾讯COS

--remote tencentcos:bucket-name/openclaw-backup

阿里云OSS

--remote aliyunoss:bucket-name/openclaw-backup

AWS S3

--remote s3:bucket-name/openclaw-backup

FTP/SFTP

--remote ftp:backup-folder
--remote sftp:backup-folder

WebDAV

--remote webdav:backup-folder

检查状态

# 仅检查 OpenClaw 状态
/root/.openclaw/workspace-main/skills/openclaw-backup/scripts/backup.sh --check-only

# 查看远程备份
rclone lsl tencentcos:backup-1252695297/openclaw-backup/

恢复备份

# 1. 下载备份
rclone copy tencentcos:backup-1252695297/openclaw-backup/openclaw-backup-2026-03-25-161836.tar.gz /tmp/

# 2. 解压
cd /root/.openclaw
tar -xzf /tmp/openclaw-backup-2026-03-25-161836.tar.gz

# 3. 重启服务
openclaw gateway restart

依赖

  • rclone 已配置远程存储
  • openclaw CLI 可用

⚠️ 注意事项

  1. 首次配置:请先运行 rclone config 配置远程存储
  2. 密钥凭证:credentials/ 包含敏感信息,请妥善保管备份
  3. 定时任务:建议设置日志文件便于排查问题
  4. 磁盘空间:确保本地有足够空间临时存放备份文件(约3MB)

Comments

Loading comments...