Intermediate Package: rsync

rsync

Efficiently synchronise files locally or over SSH.

Syntax

rsync [options] source destination

Description

rsync copies only the parts of files that have changed, making it far faster than cp for repeated backups or synchronisation, and it can transfer over SSH to or from a remote host.

Examples

rsync -av src/ dest/
Archive-mode sync, preserving permissions and timestamps
rsync -avz -e ssh src/ user@host:/remote/dest/
Sync to a remote server over SSH with compression
rsync -av --delete src/ dest/
Mirror a directory, removing files at the destination no longer present at the source

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux