Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

syq rsync

Run an rsync command with syq by putting syq in front of it:

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

Check Rsync compatibility before replacing a script. As in rsync, trailing slashes matter and -h means human-readable sizes; use --help for help. SYQ_RSYNC_OPTIONS adds extra arguments.

syq rsync [OPTIONS] SRC... DEST
syq rsync [OPTIONS] [USER@]HOST:SRC... DEST
syq rsync [OPTIONS] SRC... [USER@]HOST:DEST

Copy policy and filtering

Argument / optionMeaning
-a, --archiveArchive mode; same as -rlptgoD
-r, --recursiveRecurse into directories
-l, --linksCopy symlinks as symlinks
--insecure-linksFollow symlinks in the local paths you give, whoever owns them (as in rsync)
-H, --hard-linksPreserve hard links between selected regular files
-A, --aclsPreserve native Linux or macOS ACLs; implies permissions
-X, --xattrsPreserve extended attributes
-p, --permsPreserve permissions
-t, --timesPreserve modification times
-U, --atimes...Preserve access times; give it twice to also apply –open-noatime
-N, --crtimesPreserve birth (creation) times; requires a macOS destination
--open-noatimeRequest reads without access-time updates; warn and continue if unavailable
-S, --sparseTurn written zero ranges into sparse holes
-g, --groupPreserve group
-o, --ownerPreserve owner (root only)
-DPreserve device and special files
-h, --human-readableNo-op accepted for rsync compatibility (sizes are always human-readable)
--numeric-idsNo-op accepted for rsync compatibility (syq always uses numeric uid/gid)
--bwlimit <RATE>Limit the total transfer rate, the same limit as the bandwidth resource limit; SSH and TCP copies count compressed bytes (default unit: KiB/s; 0 disables)
-PSame as –progress –partial
--partialNo-op accepted for rsync compatibility (syq keeps partial files a later copy can resume from)
-c, --checksumSkip quick check; compare file contents block by block and repair differences
-I, --ignore-timesDon’t skip files whose size and modification time match: compare them where blocks are reused (by default, between different machines) and copy the rest whole
--inplaceUpdate existing files in place, writing only what changed, as syq cp –in-place=update does. Cannot be combined with -u or –ignore-existing, which would skip a file that an interrupted update left incomplete
--syq-ignore <PATTERN>Syq extension: skip paths matching a gitignore-style PATTERN (repeatable). Skipping a directory skips its whole subtree, so to copy only .jpg use: –syq-ignore ‘’ –syq-ignore ‘!/’ –syq-ignore ‘!.jpg’
--syq-ignore-from <FILE>Syq extension: read gitignore-style patterns from FILE (repeatable)
--syq-widen-dirs <MODE>Syq extension: which directories you own may briefly get the owner permission the copy needs; each is restored afterwards

Possible values:
- none: Never change directory permissions
- rsync: Directories the copy includes, as rsync does, but not the directory it copies into
- all: Also the directory the copy goes into and the directories above it

[default: rsync]
--deleteAfter copying, delete destination files the source does not have; skipped if scanning reported errors, and ignored paths are kept. Also accepted as –delete-after or –delete-delay. Cannot be combined with –files-from
--delete-excludedWith –delete, also remove destination paths that the –syq-ignore patterns exclude
--max-delete <N>With –delete, refuse all deletions if more than N are planned (exit 25). Unlike positive rsync limits, this is atomic; 0 and -1 both prohibit deletion
-u, --updateSkip regular files that are newer on the destination (directories, symlinks and specials are unaffected)
--ignore-existingSkip updating files that already exist on the destination
--existingNever create anything that doesn’t exist yet on the destination — files, symlinks, specials, directories, or the destination root itself; existing files are still updated
--max-size <SIZE>Don’t transfer regular files larger than SIZE (e.g. 100M). With –delete the destination copy of such a file is left alone
--min-size <SIZE>Don’t transfer regular files smaller than SIZE
--files-from <FILE>Copy only the paths listed in FILE, one per line, relative to the single source directory (- reads stdin). Listed directories are copied without their contents unless -r is given explicitly
--from0–files-from entries are NUL-separated instead of one per line

Preview and output

Argument / optionMeaning
-v, --verbose...List files with -v; show connection details with -vv
-q, --quietSuppress non-error messages
-n, --dry-runShow what would be transferred, skipped, and deleted without changing source or destination files (remote setup may still install syq)

SSH and transport

Argument / optionMeaning
-z, --compressCompress remote data in transit automatically (default)
--no-compressDisable transport compression
-e, --rsh <COMMAND>Remote shell command (default: ssh); when set, it controls SSH options and agent forwarding
--syq-auth-from <auto|ssh|@NAME|HOST>Whose SSH access to use: this machine’s own (auto or ssh), or access approved by a receiving machine (@NAME) or SSH authorization provider (HOST). When omitted, use SYQ_AUTH_FROM, then the saved choice, then auto
--rsync-path <PATH>Run the remote syq at PATH instead of syq’s automatically installed copy
--syq-no-bootstrapSyq extension: run the syq found in the remote $PATH instead of syq’s automatically installed copy
--syq-no-tcp-encryptionSyq extension: send TCP data without encryption or authentication; use only on trusted networks
--syq-no-tcpSyq extension: send all data over ssh instead of separate TCP data connections
--syq-tcp-ports <LO-HI>Syq extension: port range the remote listens on for TCP data connections

[default: 47600-47699]
--syq-tcp-congestion <ALGO>Syq extension: use this congestion-control algorithm for TCP data sockets (Linux only)
--syq-pscope <PATH>Syq extension: use the scope that syq persist on --ephemeral created at PATH, with its own connections and settings; requires the default ssh or an -e ssh command

Performance tuning

Argument / optionMeaning
-B, --block-size <SIZE>Block size for comparing files and reusing matching blocks (64K through 64M)

[default: 4M]
-W, --whole-fileCopy selected files whole; the default for local copies
--no-whole-fileReuse matching blocks at the same offsets in the destination file; the default for remote copies

[alias: –no-W]
--performance-tuning <KEY=VALUE,...>Workers, request sizes, and copy methods

Resource limits

Argument / optionMeaning
--resource-limits <KEY=VALUE,...>Bandwidth and concurrency ceilings

Integrity checking

Argument / optionMeaning
--integrity-checking <KEY=VALUE,...>Payload checks

Progress and results

Argument / optionMeaning
--progressShow progress (default when stderr is a terminal)
--no-progressNever show progress
--statsPrint transfer statistics at the end

Sources and selection

Argument / optionMeaning
[PATH]...Source(s) and destination

Help and version

Argument / optionMeaning
-V, --versionPrint version
--help-allShow all options and details
--helpShow common usage and options