← Back to Skills Marketplace
iscandium

iScandium OpenClaw Samba Backup

by iscandium · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
298
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install iscandium-openclaw-samba-backup
Description
将 OpenClaw 数据备份到远程 Samba 服务器。当用户提到「备份 openclaw」「设置自动备份」时触发。
README (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             # 备份脚本
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install iscandium-openclaw-samba-backup
  3. After installation, invoke the skill by name or use /iscandium-openclaw-samba-backup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug iscandium-openclaw-samba-backup
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is iScandium OpenClaw Samba Backup?

将 OpenClaw 数据备份到远程 Samba 服务器。当用户提到「备份 openclaw」「设置自动备份」时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 298 downloads so far.

How do I install iScandium OpenClaw Samba Backup?

Run "/install iscandium-openclaw-samba-backup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is iScandium OpenClaw Samba Backup free?

Yes, iScandium OpenClaw Samba Backup is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does iScandium OpenClaw Samba Backup support?

iScandium OpenClaw Samba Backup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created iScandium OpenClaw Samba Backup?

It is built and maintained by iscandium (@iscandium); the current version is v1.0.0.

💬 Comments