Show HN: Syq – 在机器间快速复制文件(比 rsync 更强)
Show HN: Syq – copy files between machines fast (better than rsync)

原始链接: https://greaber.github.io/syq/

**Syq** 是一款功能通用的工具,用于管理、移动和整理本地与远程机器之间的文件。它无需 SSH 服务器或开放入站端口,即可实现从服务器在笔记本电脑上进行文件传输或执行命令,从而简化工作流程。 主要功能包括: * **无缝传输:** 直接在服务器之间或本地与远程环境之间复制、重命名和重新组织文件。 * **远程控制:** 直接从服务器在笔记本电脑上执行命令。 * **开发者友好:** 通过 JSON API 或 Python SDK 自动化任务。 * **安全高效:** 使用 `--dry-run` 预览更改,使用 `--prune` 管理文件清理。同时支持断点续传。 Syq 设计用于通过在标准命令前加前缀(例如 `syq rsync`)来集成到现有工作流程中。尽管它模拟了熟悉的命令结构,但使用的是其专有协议,而非标准的 `rsync`。请注意,目前不支持 ACL、硬链接和稀疏文件等功能。对于寻求安全、可脚本化且无需代理(agentless)的远程文件同步与管理方案的用户来说,这是一个理想的选择。

一位开发者发布了名为“Syq”的新文件传输工具,旨在作为 rsync 的更快速、更易于脚本化的替代方案。通过利用并行连接、直接加密 TCP 和持久 SSH 会话,Syq 致力于优化速度和工作流程。其主要功能包括在远程 SSH shell 中工作时直接将文件下载到本地机器,以及在不转发 SSH 代理的情况下执行远程到远程的传输,转而使用受限的签名密钥。 在随后的 Hacker News 讨论中,创建者承认 Syq 目前缺乏 rsync 的“增量合并”(delta merge)算法,这意味着对于数据偏移的文件,其效率可能会较低。虽然该项目主打性能和灵活性,但评论者既对其简洁性进行了幽默的讽刺,也提出了其他解决方案,例如针对特定文件系统设置使用 `btrfs send/receive`。Syq 的定位是为那些比起 rsync 的传统功能和复杂性,更看重原始传输速度和自定义脚本的用户而设计的工具。
相关文章

原文

Copy, reorganize and remove files—locally or across machines. Resume interrupted transfers, send files to your laptop or run commands there from a server’s remote shell, and script syq using the JSON API or Python SDK. Your laptop needs no SSH server or incoming network port.

Replace server with an SSH hostname or alias you normally connect to, and project with a local directory:

syq cp project --to server --into backup

This creates or updates backup/project in your home directory on the server. To copy the contents of project directly into backup, use --srcs-in:

syq cp --srcs-in project --to server --into backup

Use --dry-run to preview a summary without copying, or --dry-run -v to list the planned changes by path. Existing destination files are updated when needed. Unrelated files stay unless you request --prune.

Start with your usual command, prefixed by syq:

syq rsync -av project/ server:backup/project/
syq rsync -av server:data/ ./data/

Syq supports common rsync options, but uses its own protocol. Rsync filter rules, hard links, ACLs, xattrs, sparse files, and rolling-checksum deltas are not supported. Check rsync compatibility before substituting it in an existing script.

联系我们 contact @ memedata.com