Files
Yigid BALABAN a168b4cbea add project tooling and test suite for many-rsync
- Add pyproject.toml: hatchling build, many-rsync entrypoint, ruff/mypy/pytest config
with 60% coverage floor
- Add uv.lock for reproducible dev installs
- Add .pre-commit-config.yaml: ruff (with --fix) + mypy hooks
- Add test_main.py: unit tests for _build_rsync_cmd, _load_raw, and load_config
covering happy paths and FATAL exit cases
- Add explanation.md: architecture overview with flowchart
- main.py: refactor into typed, testable functions (_load_raw, _build_rsync_cmd
extracted); add RsyncParameters/Config TypedDicts; add rsync_parameters config support
(rsync_path, exclude_from); harden validation (n clamped, log_level validated)
- README.md: update install instructions and document all config fields including
rsync_parameters
2026-03-31 22:05:08 +03:00
..
2026-02-23 17:14:17 +03:00

server-toolset

many-rsync

rsync a set of folders to the remote in parallel.

how to use it

Install to ~/.local/bin:

uv tool install .

After code changes, reinstall:

uv tool install --force .

config

use TOML (preferred) or JSON.

# parallel rsync configuration
# remote_folder: full rsync-compatible remote path
    # don't forget the trailing slash!
    # /Users/foo/target/
    # foo@bar:/home/foo/target/
remote_folder = ""

# local_folders: bare folder names (resolved relative to $HOME)
local_folders = ["a"]

# n: max parallel rsync processes (default: 2)
n = 2

# log_level: pick from DEBUG | INFO | WARNING | ERROR | CRITICAL
log_level = "INFO"

# use to pass arguments to the rsync binary running locally
# see rsync help/manpage for details
[rsync_parameters]
# --rsync-path
rsync_path = "/usr/bin/rsync"

# --exclude-from
exclude_from = ".rsync-exclude.txt"
  • remote_folder: rsync-compatible full path to the target folder in remote. "remote" here means that it's the target of the operation, and could still reside on the local system.
    • do not forget to use the trailing slash!
  • local_folders: each folder to be copied over
  • n: how many parallel rsync routines to be spawned
  • log_level: self explanatory
  • rsync_parameters: exposes local rsync binary's options
    • rsync_path: specify the rsync to run on remote machine
    • exclude_from: read exclude patterns from FILE