360 Secure SkillHub
360 安全技能中心

Smart Backup

基于 Node 的命令行工具,对本地目录执行带清单的日期备份、增量备份、哈希校验、恢复、同步与重复内容查找;恢复和同步覆盖或删除文件需显式 --force/--delete 并经用户同意。

分类:效率
jlacroix82
jlacroix82
热度 57.62
最近更新 2026-12-03 08:13:26

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jlacroix82/backup-sync
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
backup-sync
description
Copy, verify, and restore local file backups; compare or sync explicitly selected directory trees.
version
1.0.10
permissions
["env","filesystem.read","filesystem.write"]
metadata
{"openclaw":{"requires":{"bins":["node"]},"envVars":[{"name":"BACKUP_DIR","required":false,"description":"Alternate workspace for default backup and incremental hash state."}]}}

Smart Backup

Run node {baseDir}/smart-backup.js with approved source and destination directories. Sync and restore require separate trees. Backup excludes its destination if it is under the source. Avoid roots being modified concurrently by another process. Backup copies are uncompressed. Links and special files are skipped when collecting files.

Options Effect
--backup <source> [destination] [--dry-run] Create a dated backup under the selected destination; the default is backups/smart-backups.
--backup <source> [destination] --incr [--from-manifest <manifest>] Copy changed files only. An incremental backup contains only its copied files.
--verify <backup-directory> Verify copied files using the manifest. Valid legacy manifests with truncated digests report that limitation. Verification detects mismatch; it does not authenticate a backup's origin.
--restore <backup-directory> <destination> [--force] Check manifest and hashes first, then copy. Existing files are skipped unless the user approves --force.
--sync <source> <destination> [--dry-run] [--force] [--delete] Preview first. Existing files are overwritten only with --force; removing destination-only files also requires --delete and user approval.
--list, --status, --dedup <directory> List backups, inspect status, or find duplicate file content. Deduplication requires a directory explicitly approved by the user; it reports matching paths without content or hashes.

--dir <path> selects the default backup destination and listing location. Incremental hash state is local to the workspace.

Version 1.0.10 removes implicit workspace scanning and content hash output from deduplication.