Hacker News 熱門60

Show HN: Syq – copy files between machines fast (better than rsync)

· 33天前
跳到正文
AI 摘要

I got frustrated with the slowness of rsync and made an alternative that works faster by using multiple parallel connections, direct encrypted TCP when available, and other optimizations. I also added cool features like the ability to maintain a persistent ssh connection to the server for fast one-offs, the ability to download to your laptop while working in an ssh shell on a server, and the ability to do direct remote-remote transfers without forwarding your ssh agent (by using restricted ssh keys on the receiver that will only execute a specific request signed with the key on your laptop). It is also designed to be more robustly/flexibly scriptable than alternatives. Comments URL: https://news.ycombinator.com/item?id=49644955 Points: 12 # Comments: 10

正文

syq Fast, programmable file operations.

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.

Try a copy

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.

Already use rsync?

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.

Common tasks

I want to…Start here
Choose exactly where files landCopy and placement
Preview changesDry runs
Skip build files or use .gitignoreIgnoring paths
Mirror a directoryMirroring
Remove files in parallelRemoval
Send files to my laptop from a server’s shellReceiving files
Run a build or open an artifact on my desktop from a serverCommands on your receiving machine
Copy between two serversRemote-to-remote transfers
Rename or reorganize files during a copyMappings
Use syq from PythonPython SDK
Read results from a scriptAutomation results
Make copies fasterSpeed
查看原文(Hacker News 熱門)