Objectifs :

Sauvegarder, synchroniser, accéder, restorer ses données avec rsync

Comment :

rsync copies only the diffs of files that have actually changed, compressed and through ssh if you want to for security

Rsync transactions without SSH are insecure because the protocol and the software itself does not include any content encryption. So if there is a man in the middle he can read/copy what you are backing up. Authentication can be read also

In daemon mode, rsync listens on the default TCP port of 873, serving files in the native rsync protocol or via a remote shell such as RSH or SSH.

[5] In the latter case, the rsync client executable must be installed on the remote machine as well as on the local machine.

Bases :

rsync -options –otherOptions sourceDir targetDir


rsync [OPTION…] SRC… [DEST]

Access via rsync daemon:



Example 1 :

rsync -vaz ~/rep1/ ~/rep2

This example copies the contents of the ~/rep1 directory to the rep2 directory.
a : archive mode
>Recursive mode
>Preserves symbolic links
>Preserves permissions
>Preserves timestamp
>Preserves owner and group
v : verbose
z : zip files

Example 2 :

rsync -vaz ~/rep1 ~/rep2

This example creates a rep1 directory under the ~/rep2 directory and recursively copies the contents of the ~/rep1 into this new directory. This is slighly different from the first example.

Example 3 :

# rsync -av –progress –stats –delete –force hello.php user@host.com::instance/repository/
# rsync -av –progress –stats –delete –force hello.php user@host.com::instance/repository//testsync/

Links :