← 返回 Skills 市场
iscandium

iScandium OpenClaw Samba Backup

作者 iscandium · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
298
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install iscandium-openclaw-samba-backup
功能描述
将 OpenClaw 数据备份到远程 Samba 服务器。当用户提到「备份 openclaw」「设置自动备份」时触发。
使用说明 (SKILL.md)

OpenClaw Samba 备份

触发条件

关键词 动作
「备份 openclaw」「backup openclaw」 执行完整备份流程
「自动备份」「定时备份」 设置定时任务

执行模式

选项 说明
✅ 自动执行 触发后直接执行备份,无需逐步确认

配置

配置文件:config/default.json(参数说明见 config/params_schema.json

首次使用前,复制配置模板:

cp config/default.json.example config/default.json
参数 说明
target_server_ip Samba 服务器 IP
target_share_name 共享文件夹名称
target_share_username Samba 用户名
target_share_password Samba 密码
source_admin_username 本服务器管理员用户名
source_admin_password 管理员密码(sudo 用)
max_backups 保留备份数量(默认 7)
source_dir 备份源路径(默认 ~/.openclaw)
target_folder 目标文件夹名(默认 hostname)
mount.vers SMB 版本(默认 2.0)
mount.mount_point 挂载点(默认 /mnt/iscandium-openclaw-samba-backup)

工作流(1 步)

Step 职责 执行者 文档 输入 输出
01 执行备份 脚本 scripts/backup.sh config/default.json Samba 共享目录

备份位置

//{target_server_ip}/{target_share_name}/{target_folder}/{timestamp}/

运行备份

bash ~/.openclaw/workspace/skills/iscandium-openclaw-samba-backup/scripts/backup.sh

设置定时备份

首次配置后,使用 OpenClaw 内置 cron:

openclaw cron add \
    --name "OpenClaw Samba 备份" \
    --cron "0 3 * * *" \
    --tz "\x3Cyour-timezone>" \
    --message "运行备份:bash ~/.openclaw/workspace/skills/iscandium-openclaw-samba-backup/scripts/backup.sh" \
    --session isolated \
    --agent \x3Cyour-agent> \
    --timeout-seconds 600 \
    --no-deliver

依赖

  • cifs-utils(Samba 客户端)
sudo apt install cifs-utils

目录结构

iscandium-openclaw-samba-backup/
├── SKILL.md
├── config/
│   ├── default.json           # 私有配置(不发布)
│   ├── default.json.example  # 配置模板
│   └── params_schema.json    # 参数 schema
└── scripts/
    └── backup.sh             # 备份脚本
安全使用建议
This skill appears to do what it says (copy OpenClaw files to a Samba share), but it has important security weaknesses: it asks you to put the SMB password and your server admin (sudo) password in a plaintext JSON and then feeds that admin password to sudo repeatedly. Before installing or enabling automated runs: 1) Do NOT store admin passwords in plaintext if you can avoid it — prefer running the script as root, using a credentials file for mount.cifs with chmod 600, or creating a sudoers entry that allows only the necessary mount/cp/rm commands without a password. 2) Inspect and test the script in a safe environment (non-production) to verify mount points and paths — misconfiguration could cause accidental deletions (the script runs rm -rf on backup directories). 3) Limit the SMB server IP to a trusted host and rotate credentials after testing. 4) Consider improving the script (use a credentials file, use rsync instead of cp to preserve metadata, use jq for robust JSON parsing, avoid echoing passwords). If you are not comfortable storing or managing the required passwords securely, do not enable automatic execution or cron scheduling for this skill.
功能分析
Type: OpenClaw Skill Name: iscandium-openclaw-samba-backup Version: 1.0.0 The skill is classified as suspicious due to highly insecure credential handling and potential command injection vulnerabilities. It requires the user to store their local administrator (sudo) password in plain text within 'config/default.json' and pipes it into 'sudo -S' commands in 'scripts/backup.sh'. Furthermore, the script parses configuration values using brittle grep/cut logic without sanitization, making it vulnerable to shell injection if parameters like 'target_share_name' or 'target_share_password' contain shell metacharacters.
能力评估
Purpose & Capability
Name/description (Samba backup) matches the included files and behavior: the script mounts a CIFS share and copies OpenClaw data there. The included config fields (Samba username/password, target IP/share) are expected for this purpose.
Instruction Scope
SKILL.md and the script are narrowly scoped to mounting a Samba share and copying files. The runtime instructions reference the repo-local config and the script path and instruct adding a cron job — all within the backup purpose. Minor inconsistency: SKILL.md suggests copying config/default.json.example, but the file manifest contains config/default.json (no `.example`) — could confuse first-run users.
Install Mechanism
This is an instruction-only skill with a shell script; no install spec or external downloads. Dependency is cifs-utils (apt), which is appropriate for SMB mounts. Low installation risk from the registry standpoint.
Credentials
The script requires two sensitive secrets in a local JSON (target_share_password and source_admin_password). Storing the local administrator password in plaintext within the skill config and repeatedly piping it into sudo (-S) is disproportionate and increases credential exposure. While a root/sudo approach is necessary to mount and create directories, safer alternatives (root-run, limited sudoers rules, credential files with tight perms, or using a mount credentials file) are not used or suggested.
Persistence & Privilege
always:false and no background/agent-wide changes are requested. The skill does not modify other skills or system-wide agent settings. It instructs the user how to add a cron job via OpenClaw, which is a user action.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iscandium-openclaw-samba-backup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iscandium-openclaw-samba-backup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of OpenClaw Samba backup skill. - Backs up OpenClaw data to a remote Samba server, triggered by keywords like "备份 openclaw" or "设置自动备份". - Supports both immediate and scheduled (cron-based) backups. - Includes easy configuration via JSON files, with a provided template and schema. - Retains a configurable number of backups and organizes them by timestamp. - Requires cifs-utils for Samba mounting. - Provides a standalone backup script for manual or automated runs.
元数据
Slug iscandium-openclaw-samba-backup
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

iScandium OpenClaw Samba Backup 是什么?

将 OpenClaw 数据备份到远程 Samba 服务器。当用户提到「备份 openclaw」「设置自动备份」时触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 298 次。

如何安装 iScandium OpenClaw Samba Backup?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install iscandium-openclaw-samba-backup」即可一键安装,无需额外配置。

iScandium OpenClaw Samba Backup 是免费的吗?

是的,iScandium OpenClaw Samba Backup 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

iScandium OpenClaw Samba Backup 支持哪些平台?

iScandium OpenClaw Samba Backup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 iScandium OpenClaw Samba Backup?

由 iscandium(@iscandium)开发并维护,当前版本 v1.0.0。

💬 留言讨论