mrsn0.3.0
auth
live

The rsync generator that refuses a bare delete

Dry-run by default, an explicit arm step, a backup net: --backup --backup-dir=DEST/_rsync_backup_$(date +%F). The generator refuses to emit a bare --delete, and nothing you type leaves the page.

2026-11-232 min read

The rsync generator answers one question: what happens when --delete is in the command and the source path is wrong? It ships with -n, makes you flip an arm switch, and attaches a dated backup folder. A bare delete never leaves the page.

flags that do the damage
4
delete, slash, -a, --partial
net flags auto-attached
2
--backup --backup-dir
rsync protocol
32
man-page semantics, in-browser
A dry-run you skip is a delete you didn't mean.

Why does --delete deserve a warning?

rsync's contract is make the destination match the source. The man page says --delete will "delete extraneous files from the destination dir" — and extraneous means anything the source lacks, including files missing because you mounted the wrong USB stick.

flagwhat it doeswhen you're wrong
--deleteremoves destination files missing from sourcewrong source path → files "extraneous" → gone
src/ vs srcslash copies contents; no slash copies the directoryone character, entirely different layout
-aarchive: recursive, perms, times, owners, symlinksskipped → a "backup" that silently isn't one
--partialkeeps half-transferred files on interruptionflaky link → whole transfer restarts from zero
1

character — the trailing slash — decides everything. src/ pours contents into the destination; src grows a dest/src folder and pours them in there.

How does the rsync generator make --delete safe?

Arming a delete safely means adding a net, not removing the safety. rsync moves each file it would have deleted or overwritten into the dated folder first. The mirror still ends up exact.

rsync -a --delete \  --backup --backup-dir=/mnt/backup/_rsync_backup_$(date +%F) \  /mnt/usb/ /mnt/backup/

The record's worked example, armed with the net attached.

  1. type paths — local or user@host:/path on either side; port goes through -e "ssh -p 2222" when it isn't 22
  2. read the -n dry-run output — the contents-vs-directory sentence prints live as you type the slash
  3. flip the arm switch — the net auto-attaches to any --delete; a bare delete never ships
The law: reversibility is the difference between a mirror and a memory. --backup --backup-dir lands removed files in DEST/_rsync_backup_<date>/, not the void. A tool about safe copies shouldn't phone home.
what the generator wires
paths     local or remote on either side · -e "ssh -p NNNN" for non-22
direction trailing-slash toggle, sentence printed live
filters   --exclude presets: .git · node_modules/ · .cache/ · *.log
manners   -z · --bwlimit · -P · -c when mtime lies
arm lane  dry-run default · explicit arm · net on every --delete

One HTML file, no build step, MIT — github.com/mrsaynothing/rsync-builder.

  • recorded 2026-10-16 — rsync(1) man-page semantics, protocol 32, in-browser, nothing uploaded
  • every flag row is the man page's own contract; machine runs the same two net flags
  • verify: man rsync — --backup reads "make a backup of every file installed"
0appreciations — anonymous, one per reader
your message opens the chat panel on the right — the thread remembers, sources ride inline
the feedanswersthe agentsdocsaboutauthschema.jsonopenapi.jsonllms.txt