What is Rsync

Rsync is a tool for file transfer and synchronization of files or a tree (the directory structure and file) in one direction, both local transfer (in the same system) and remote (network / internet).  Rsync is a powerful tool with easy configuration.

Rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of Rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. Rsync can copy or display directory contents and copy files, optionally using compression and recursion. Wikipedia.

Benefit of Rsync

  1. Bandwidth saving and supporting resume transfer. At the recipient side, if the files was already exist but not identical with the source (for example, smaller size or there is an older version), Rsync can then conduct a series of checksum comparison to minimize the amount of data that must be transferred. This algorithm is called the Rsync algorithm. Rsync actually originated from the paper that describes the algorithm. As an example, if you have 2 versions of the file and both of them are about 100MB in in size, you may only need transfer about 50mb, 10MB, or even below equates to 1MB depending on how similar between the file. On another situation, Rsync supported resume transfer. You could transfer  a part of file or group file, stop the process for a while (by any reason) and then continue transferring without problem and without started from the beginning.
  2. Fast Transfer. Beside incremental update as described above, Rsync also uses data compression and pipeline while transferring file. It makes Rsync more faster than FTPwhile transferring a bulk number of small file.
  3. Flexibility. Rsync could also transferring directory & tree folder with recursive option and get the flexibility to remove or let them unchanged. We can leave and keep the permission setting, ownershi management, Access Control List, Symbolic link, Hardlink, device etc
  4. Easy to Setup. By default, standard Rsync Server could be prepared within 5 minutes

I’m using openSUSE 11.0 and here is a few step to get Rsync Server started in a few minutes.

  1. Installing the Rsync package with YAST Package Manager (YAST | Software | Software Management) or on console by typing :
  2. [code language=’cpp’]zypper in rsync[/code]
    and then press Enter

  3. Edit the /etc/rsyncd.conf and change  the item according to your configuration. I make 2 modification entry, the first one is hosts allow = trusted.hosts (mark as remark) and then changed share name and physical folder ([Home-Vavai] and path = /home/vavai)
  4. My Configuration :
  5. [code language=’cpp’]
    gid = users
    read only = true
    use chroot = true
    transfer logging = true
    log format = %h %o %f %l %b
    log file = /var/log/rsyncd.log
    pid file = /var/run/rsyncd.pid
    #hosts allow = trusted.hosts
    slp refresh = 300
    [Home-Vavai]
    path = /home/vavai
    comment = Data-vavai
    # auth users = user
    # secrets file = /etc/rsyncd.secrets[/code]

  6. #hosts allow = trusted.hosts could be used as restriction to for allowed host
  7. Change the /etc/rsyncd.motd; to add the Message of the Day and then add motd file = /etc/rsyncd.motd option on /etc/rsyncd.conf
  8. Restart Rsync service : [code language=’cpp’]service rsyncd restart[/code]
  9. Testing :[code language=’cpp’]rsync Server-IP-Address::[/code], e.g. : [code language=’cpp’]rsync 192.168.0.1::[/code]
6 thoughts on “How to Setup openSUSE as Rsync Server”
  1. I do as you did and works, but in the log file I get this message every 5 min
    Using openSuse 11.1
    2009/07/08 17:25:50 [31526] Service registration expired, refreshing it
    2009/07/08 17:25:50 [31526] rsyncd registering 1 service with slpd for 300 seconds:
    2009/07/08 17:25:50 [31526] service:rsync://silas.stevens:873/Test
    2009/07/08 17:25:50 [31526] Error registering service with slp -20
    2009/07/08 17:25:50 [31526] Error registering service with slp -1074656232
    any ideas?

  2. I do as you did and works, but in the log file I get this message every 5 min
    Using openSuse 11.1
    2009/07/08 17:25:50 [31526] Service registration expired, refreshing it
    2009/07/08 17:25:50 [31526] rsyncd registering 1 service with slpd for 300 seconds:
    2009/07/08 17:25:50 [31526] service:rsync://silas.stevens:873/Test
    2009/07/08 17:25:50 [31526] Error registering service with slp -20
    2009/07/08 17:25:50 [31526] Error registering service with slp -1074656232
    any ideas?

Leave a Reply to Albert v.d. Woude Cancel reply

Your email address will not be published.