MB Networks
CFG-08 · Backup & transfer
Pick the flags you want, see a plain-English explanation of each one, and get the exact command — including the trailing-slash difference that changes what actually gets copied.
--delete deletes. Anything present at the destination but not at the source is removed permanently. Run once with -n (dry run) first and read the output before running for real.
Command
A trailing slash on the source path means "copy the contents of this directory"; no trailing slash means "copy this directory itself, nested one level deeper at the destination." rsync -a ./data/ dest/ and rsync -a ./data dest/ produce genuinely different results — the first copies files directly into dest/, the second creates dest/data/. This is the single most common rsync surprise.
-n runs the exact same matching logic as a real transfer and prints what it would do, without touching anything — the closest thing to a safety net rsync has, especially paired with --delete, which is the one flag on this page capable of permanently removing files at the destination.
src/ (with slash) copies the directory's contents into the destination; src (no slash) copies the directory itself as a new subdirectory of the destination. Forgetting this is the most common reason rsync output ends up one level deeper (or shallower) than expected.
It's safe when the destination is meant to be an exact mirror of the source and nothing else — run a dry run (-n) first to see exactly what it would remove. It's not safe if the destination has files you've added independently that aren't in the source; those get deleted too.
No — only include it when source or destination is a remote user@host:/path location. For two local paths on the same machine, rsync doesn't need SSH at all.
Related tools
DevOps
SSH Config Builder
Build an SSH config file from a form — host aliases, ports, identity files, ProxyJump, and keepalives. No account, nothing leaves your browser.
Open →DevOps
Cron Expression Builder
Build or decode cron expressions. Enter a cron schedule and get a plain-English description plus the next 10 run times.
Open →DevOps
systemd Service & Timer Builder
Generate a systemd .service and .timer unit pair from a form — command, user, schedule, and the systemctl commands to enable it. No account, nothing leaves your browser.
Open →DevOps
chmod & umask Calculator
Convert Linux/Unix file permissions between checkboxes, symbolic notation, and octal — plus a umask calculator showing the resulting default file and directory permissions.
Open →DevOps
Crontab to systemd Timer Converter
Convert a crontab line into a systemd .service + .timer pair, including the two-OnCalendar-line trick for cron's day-of-month/day-of-week OR behavior. No account, nothing leaves your browser.
Open →DevOps
Docker Compose Generator
Build a valid Docker Compose file from a form — services, images, ports, volumes, environment variables, and restart policy. No account, nothing leaves your browser.
Open →