{
 "kind": "app",
 "id": "app:macos-rsync",
 "url": "https://headlesson.com/apps/macos-rsync",
 "name": "macOS rsync (openrsync)",
 "one_liner": "The rsync command bundled with macOS, which is openrsync: syncs one folder into another, copying only new and changed files, with a dry run and optional removal of files gone from the source.",
 "description": "/usr/bin/rsync on macOS is openrsync, a separate program from the rsync project that speaks rsync protocol 29 and reports itself as rsync version 2.6.9 compatible. On the authored test folders, every step of the trial (first copy, update by size and mtime, -n, --delete, -c, --exclude and --no-whole-file) left the same file bytes, sizes, mtimes and link targets as rsync 3.5.0; permissions, owners and extended attributes were not checked. Its -v and --stats output and its totals of bytes sent and received differ. It needs no install.",
 "made_by_headlesson_operator": false,
 "interfaces": [
  {
   "kind": "cli",
   "name": "/usr/bin/rsync",
   "install": "test -x /usr/bin/rsync",
   "verify": "/usr/bin/rsync --version",
   "auth": "None for folders on the same machine.",
   "docs": "headlesson editorial judgement"
  }
 ],
 "tests": [
  {
   "record_id": "test:kyer3iy",
   "url": "https://headlesson.com/tests/kyer3iy",
   "date": "2026-11-15",
   "version": "openrsync protocol 29 (macOS 27.2 bundled)",
   "status": "passed"
  }
 ],
 "latest_test_conclusion": "On 2026-11-15, the headlesson operator ran all 5 steps of this lesson with macOS rsync (openrsync) openrsync protocol 29 (macOS 27.2 bundled) (macOS 27.2 (26B123) arm64; existing /usr/bin/rsync (openrsync, protocol version 29); bash -c with each exact step in a fresh empty folder; authored files only; no network), and all passed. The final Next step is advice and was not run. No independent check has been reviewed. This is the operator's own run, not a vendor claim.",
 "independent_check": {
  "state": "not_checked"
 },
 "lesson": {
  "goal": "Make a small source folder and a destination with one extra file, preview the sync with -n, then sync with --delete and --exclude '*.log' using /usr/bin/rsync, and list what the destination holds.",
  "steps": [
   "/usr/bin/rsync --version",
   "mkdir -p src/sub dst && printf 'one\\n' > src/a.txt && printf 'two\\n' > src/sub/b.txt && printf 'log\\n' > src/skip.log && printf 'old\\n' > dst/gone.txt",
   "/usr/bin/rsync -a -n -v --delete --exclude '*.log' src/ dst/",
   "/usr/bin/rsync -a -v --delete --exclude '*.log' src/ dst/",
   "find dst -type f | sort"
  ],
  "next_advice": "Next: Agree with the user on the real source and destination and on whether files missing from the source may be removed. Run the command with -n first and read the deleting lines, then run it without -n, and compare the two folders before relying on the copy.",
  "cautions": {
   "note": "These notes come from the lesson. Some describe failures seen in tests; others are general cautions. Each one is not a separately tested result.",
   "items": [
    "The bundled /usr/bin/rsync needs no install. In the trial on macOS 27.2 (26B123), --version printed \"openrsync: protocol version 29\" and \"rsync version 2.6.9 compatible\".",
    "The same command name may run a different program. When Homebrew rsync is installed, a bare rsync runs whichever comes first in PATH (in the trial /opt/homebrew/bin/rsync came first). Call /usr/bin/rsync by its full path to be sure which one runs.",
    "The -n output has no (DRY RUN) mark at the end, unlike rsync 3.5.0. In the lesson run it differed from the real run only in the byte counts and in the real run listing the top folder as ./ while -n did not. Read the command line, not the output, to tell them apart.",
    "With -v, a file named in Japanese was printed as escaped bytes (for example \\#227), while the copied file had the right name and content. Symbolic links were listed without their target.",
    "--stats is worded differently from rsync 3.5.0 (Unmatched data instead of Literal data, byte counts with a B suffix and no thousands separators), so a parser written for one does not read the other.",
    "--help does not list every option it accepts; --no-whole-file was not in the list but was accepted. For the same three-file update as in the rsync 3.5.0 record (a.txt, a 256 KiB big.bin with 64 changed bytes, and new.txt) it sent 1,510 bytes unmatched and 261,444 bytes matched in total, the same data counts as rsync 3.5.0; the total bytes sent and received differed (3,658 and 2,342 against 3,450 and 2,332).",
    "As with rsync 3.5.0, the default check is size and modification time: a file changed to other content of the same size and mtime was not copied until -c was given. A missing source exited 23 and still created the empty destination folder.",
    "Only folders on the same machine were tried. ssh, a daemon, owners and permissions across machines, extended attributes and large trees were not tried.",
    "Confirm: Check with /usr/bin/rsync --version which program runs, run with -n first and read every deleting line before using --delete, and compare the destination with the source afterwards."
   ]
  },
  "note": "This is the current lesson. The test record above was run on the lesson as it was at its own revision; they can differ."
 },
 "mcp_get": "headlesson_get id=\"app:macos-rsync\" sections [\"lesson\",\"gotchas\"]",
 "axes": {
  "license": {
   "value": "ISC",
   "checked": "2026-11-18",
   "certainty": "primary",
   "source": "https://github.com/apple-oss-distributions/rsync/blob/rsync-184/openrsync.txt",
   "by": "official"
  },
  "open_source": {
   "value": true,
   "checked": "2026-11-18",
   "certainty": "primary",
   "source": "https://github.com/apple-oss-distributions/rsync/blob/rsync-184/openrsync.txt",
   "by": "official"
  },
  "pricing": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "has_human_gui": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "non_interactive": {
   "value": true,
   "checked": "2026-11-15",
   "certainty": "primary",
   "source": "headlesson editorial judgement",
   "by": "editorial"
  },
  "machine_output": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "local_mcp": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "remote_mcp": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "cli": {
   "value": true,
   "checked": "2026-11-15",
   "certainty": "primary",
   "source": "headlesson editorial judgement",
   "by": "editorial"
  },
  "rest_api": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "auth": {
   "value": "none",
   "checked": "2026-11-15",
   "certainty": "inferred",
   "source": "headlesson editorial judgement",
   "by": "editorial"
  },
  "self_hostable": {
   "value": true,
   "checked": "2026-11-15",
   "certainty": "inferred",
   "source": "headlesson editorial judgement",
   "by": "editorial"
  },
  "embeds_llm": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "refusal_contract": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "audit_log": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "last_release": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  },
  "ja_support": {
   "value": "unknown",
   "checked": null,
   "certainty": null,
   "source": null,
   "by": null
  }
 },
 "sources": [
  {
   "fields": [
    "/name",
    "/one_liner",
    "/description",
    "/lesson/steps/0",
    "/lesson/steps/1",
    "/lesson/steps/2",
    "/lesson/steps/3",
    "/lesson/steps/4",
    "/lesson/cautions/items/0",
    "/lesson/cautions/items/1",
    "/lesson/cautions/items/2",
    "/lesson/cautions/items/3",
    "/lesson/cautions/items/4",
    "/lesson/cautions/items/5",
    "/lesson/cautions/items/6",
    "/interfaces/0/kind",
    "/interfaces/0/name",
    "/interfaces/0/verify",
    "/interfaces/0/docs",
    "/axes/non_interactive",
    "/axes/cli"
   ],
   "source": "headlesson editorial judgement",
   "checked": "2026-11-15",
   "certainty": "primary",
   "by": "editorial"
  },
  {
   "fields": [
    "/lesson/goal",
    "/lesson/next_advice",
    "/lesson/cautions/items/7",
    "/lesson/cautions/items/8",
    "/interfaces/0/install",
    "/interfaces/0/auth",
    "/axes/auth",
    "/axes/self_hostable",
    "/relations/0"
   ],
   "source": "headlesson editorial judgement",
   "checked": "2026-11-15",
   "certainty": "inferred",
   "by": "editorial"
  },
  {
   "fields": [
    "/axes/license",
    "/axes/open_source"
   ],
   "source": "https://github.com/apple-oss-distributions/rsync/blob/rsync-184/openrsync.txt",
   "checked": "2026-11-18",
   "certainty": "primary",
   "by": "official"
  }
 ],
 "primary_record": "Test results here are the operator's own past lesson trials (legacy). They are not claimed to meet level L1 of run-task-contract/0.1.0.",
 "relations": [
  {
   "type": "alternative-to",
   "to": "app:rsync",
   "url": "https://headlesson.com/apps/rsync",
   "scope": "usecase:sync-folders"
  }
 ],
 "relations_not_published": 1,
 "cite": "headlesson app:macos-rsync: see test record test:kyer3iy (https://headlesson.com/tests/kyer3iy).",
 "page_updated": "2026-11-17"
}
