Tuncay Sahin

ICT Engineer | Docent ICT & Trainer

Rsync is an utility to (remote) synchronize files for backup/mirroring purposes.

The main advantages of the rsysnc is :

  • Speed: Initially copies the whole content between local and remote system. Next time, it transfers only the changed blocks or bytes to the destination.
  • Security: Encrypted form of data can be transferred using ssh protocol.
  • Less Bandwidth: rsysnc uses compression and decompression of data block by block at both the end.

Rysync package must be installed on both remote system as well as local machine. Rsysncd listens the defaults TCP port 873, copying files via a remote shell such as rsh or ssh.

Syntax: #rsysnc [options] source path destination path


Synchronize local directory

rsync -zvr /home/aloft/ /backuphomedir

Synchronize local to remote host

rsync -avz /home/aloft/ azmath@

Synchronize remote to local host

rsync -avz azmath@ /home/aloft/

In above command rsysnc uses:

  • -z for enable compression,
  • -v for verbose,
  • -r for recursive.
  • -a option, it preserves owner and groups, it preserve timestamp, symbolic links, permission, recursive mode.


You can schedule backup in cron using rsync command

0 0 * * * /usr/local/sbin/bkpscript.sh &> /dev/null

vi /usr/local/sbin/bkpscript.sh

rsync -avz -e ‘ssh -p2093′ /home/test/ root@

Meer informatie

Voor meer informatie of voor een persoonlijk adviesgesprek kunt u altijd vrijblijvend contact met mij opnemen.