Skip to content
shellhacks.dev

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.

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.

Share

Frequently asked questions

How do I use rsync over SSH on a different port?
-e "ssh -p 2222". The builder adds it when you set a port or key for a remote path.
How do I resume an interrupted transfer?
Run the same command again with --partial (or -P, which also shows progress). rsync skips completed files and continues partial ones.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Keep planning

Similar tools