Preview a Backup with rsync --dry-run

See exactly which files a sync would copy or delete before letting rsync change anything.

macOSbackupcopyrsyncLow risk
Run rsync -ahn --delete ~/Documents/Project /Volumes/Backup/ to print the plan; drop the n for the real run.

01Command

Command
$ rsync -ahn --delete ~/Documents/Project /Volumes/Backup/   # remove -n to actually run

02What it does

rsync compares source and destination and normally copies immediately; the -n (dry-run) flag turns it into a rehearsal that only lists the deltas — files to copy, files --delete would remove. This makes it the safe way to test backup commands, especially destructive ones, and the output doubles as a change report between two folders.

03Risk

RiskLow risk
RequirementsAdding --delete in a real run removes extra files in the destination — always rehearse with -n first.
!Warning: A trailing slash on the source means 'copy the contents'; without it rsync nests the whole folder — check the dry-run output to catch that before the real copy.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • rsync - Fast, Versatile File Copy/Sync
    SS64 · technical · 2026-09-17
    Evidence: Documents -n / --dry-run (show what would have been transferred without doing it), -a archive mode, -h human-readable output and the --delete option.
  • rsync(1) man page
    manpagez.com · technical · 2026-09-17
    Evidence: The rsync man page describes -n/--dry-run as performing a trial run with no changes made, plus -a archive, -h output and --delete deletion of extraneous files.

Last verified: 2026-09-19 · Category: Files & Folders

06Related solutions