Linux Commands / IT Support Guides
Preview a Linux transfer with rsync dry-run
Preview which files rsync would copy before running a synchronization.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Understand the problem
Identify the source and the intended backup directory. Confirm that the backup drive is mounted if the destination is supposed to be on a separate drive.
Run the command
Run the shown command with --dry-run still present. The slash after /srv/source/ tells rsync to copy the contents of that directory into the destination.
rsync -av --dry-run /srv/source/ /mnt/backup/source/
Read the output
A line such as reports/summary.txt means rsync plans to transfer that file. The destination stays unchanged during the preview. Review the file list as well as any warnings.
Choose the next step
If the preview shows unexpected files, check which directory is first and whether the source ends in a slash. Add --itemize-changes to the dry run if you need more detail about the proposed updates.
Before making changes
Before running the real copy, confirm that the dry run completed successfully and that the source and destination still match your plan. Verify the resulting copy separately.