Shared server guidance · Question & answer

How do I preview a Linux server file migration with rsync?

Use rsync’s dry-run mode to inspect the proposed file changes before a planned transfer. It reads metadata and contacts the destination but does not transfer the file changes. The preview is not a database-consistency method or a reliable measurement of real transfer duration.

IntermediateLinux source and destination servers with rsync and SSH
Go to the answer

Before you start

  • rsync installed on both Linux servers, authorised SSH access and an independently verified destination host key.
  • Read access to the source and permission to inspect the intended destination directory.

Instructions

1. Confirm the exact scope

Run from the source server and replace the example destination with your authorised server. Confirm both directory paths and the destination identity. This example covers a selected application-data directory; exclude live database storage from a generic file transfer and use its supported migration procedure.

2. Preview proposed changes

The source’s trailing slash means the contents of that directory are considered for the destination. Keep dry-run enabled while reviewing names and metadata. Archive mode requests common metadata preservation; ownership, groups, ACLs and extended attributes still need an explicit migration design.

Remote Linux shell
rsync --archive --dry-run --itemize-changes --verbose -- /srv/app-data/ adminuser@203.0.113.10:/srv/app-data/

Performs a dry-run over SSH. It lists proposed file changes without copying them; the address and paths are examples for a confirmed source and destination.

3. Review before a separate transfer

Investigate unexpected paths, permission failures and unexpectedly large scope. Plan exclusions, ownership mapping and application consistency before approving a real run. Changes at either end after the preview can alter the eventual result.

Check the result

  • The preview covers only the intended files and reports no unexplained access errors.
  • The target identity, path and metadata requirements are confirmed.

Troubleshooting

The preview completes much faster than expected
A dry-run does not send the file payload. Measure an approved representative transfer separately when estimating the migration window.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.