Skip to content

rsync synchronization

rsync (remote sync) is a utility for efficiently transferring and synchronizing files between a source and a destination.^[600-developer__linux__centos7-command.md]

Mechanism

The tool operates on a synchronization principle where it skips copying if the content is identical and only performs a replacement if the content differs.^[600-developer__linux__centos7-command.md] This incremental behavior makes it more efficient than a simple copy for backup and mirroring tasks.

Operation

A defining characteristic of rsync in standard usage is that it performs additive synchronization; it updates or adds files but will not delete files from the destination even if they no longer exist at the source.^[600-developer__linux__centos7-command.md]

Common Usage

A typical command for synchronizing a local directory to a remote location uses the -r (recursive), -v (verbose), and -l (links) flags.^[600-developer__linux__centos7-command.md]

rsync -rvl $source $user@ip:$dest

It is often utilized in scripts to loop through multiple hosts and distribute files to identical directory paths across a cluster^[600-developer__linux__centos7-command.md].

  • [[scp]] (Secure Copy Protocol)
  • [[SSH]]
  • [[Cron]]

Sources

^[600-developer__linux__centos7-command.md]