From man rsync
:
Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon.
It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination.
Basic Usage:
rsync [options] <src> <dest>
src/dest can be local or remote, but not both remote!
Important options:
Replicate data from folder1 to folder2:
rsync -avrzP --delete folder1/ folder2
-v -P
and use -q --partial
insteadNote the trailing slash; without slash it will put folder1 inside folder2