$linuxjunkies
>

rsync

also: rsync

rsync is a command-line tool that efficiently synchronizes files and directories between local and remote systems, copying only the differences since the last sync.

rsync is a powerful file synchronization utility that uses a delta-transfer algorithm to minimize network bandwidth. Instead of copying entire files, it compares source and destination, transferring only the changed portions.

Common use cases include backups, mirroring directories, and deploying code. The basic syntax is rsync [options] source destination, where either can be local paths or remote paths specified as user@host:/path.

Example: rsync -avz ~/documents/ [email protected]:/backups/docs/ mirrors a local documents folder to a remote server, using archive mode (-a), verbose output (-v), and compression (-z). The trailing slash on the source matters: with it, the contents are copied; without it, the folder itself is copied.

Related terms