rsync Command Builder
Build an rsync command for local or SSH copies with archive mode, compression, --delete, excludes, progress, partial transfers and a dry run.
Free · No sign-up · Your inputs stay in your browser
Input
Build an rsync command
Output
rsync command
Command
rsync -azv --progress --delete --dry-run --exclude=.git --exclude=node_modules --exclude=.env ./dist/ deploy@web-1:/var/www/app/current/
-a is -rlptgoD: recursive, and keeps symlinks, permissions, times, group, owner and devices. With --delete, a missing trailing slash on the source or a wrong destination can empty a directory, so run with --dry-run until the list looks right, then remove it.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
The trailing slash
rsync -a src/ dest/ copies the contents of src into dest; rsync -a src dest/ copies the directory itself, creating dest/src. With --delete the difference decides which files are removed, so the slash is the first thing to check.
Dry run first
--dry-run (-n) lists what would be transferred and deleted without touching anything. Run it, read it, then run without it. -a is shorthand for recursive, preserving links, permissions, times, group, owner and devices, as the rsync manual explains; add -z only over slow networks, since it costs CPU.