rsync -avn src/ backups/

rsync Command Builder

Pick source and destination, common flags, and exclude patterns to get a correct rsync command for homelab backups and deploys.

Adds -e 'ssh -p PORT' for remote paths.
rsync

Quick reference

Trailing slash: source/ copies directory contents; source without / copies the directory itself.

Common flags
-aArchive
-vVerbose
-zCompress transfer
-nDry run
-PPartial + progress
--deleteMirror deletions

Linux rsync backup and sync helper

Use this rsync command generator to assemble safe file sync and backup commands. Combine archive mode with dry-run before enabling delete on production paths.

rsync FAQ

What does rsync -a mean?

-a (--archive) turns on recursive copying and preserves permissions, modification times, symbolic links, and other metadata. It is the usual starting point for backups.

When should I use rsync --delete?

--delete makes the destination match the source by removing extra files there. Always test with -n (--dry-run) first to see what would be deleted.

Does a trailing slash on the source path matter?

Yes. trailing slash copies the contents of the directory into the destination. Without a trailing slash, rsync copies the directory as a subdirectory of the destination.

How do I use rsync over SSH on a non-default port?

Use ssh with -p PORT in the rsync remote shell: rsync ... -e 'ssh -p 2222' source/ dest/ This builder can add -e automatically when you set SSH port.