Revision 5 as of 2007-01-14 22:36:13

Clear message

Note

This page lacks explanation and doesn't explain what the user can do with rsync. It needs revision to be useful.

Introduction

rsync is a program that behaves in much the same way that rcp does, but has many more options and uses the rsync remote-update protocol to greatly speed up file transfers when the destination file is being updated - rsync(1).

This document is a rsync quick howto.

Installation

To install rsync do the following steps:

$ sudo apt-get install rsync xinetd

Configuration

1. Edit /etc/default/rsync to start rsync as daemon using xinetd.

$ sudo vim /etc/default/rsync
  RSYNC_ENABLE=inetd

2. Create /etc/xinetd.d/rsync to launch rsync via xinetd.

$ sudo vim /etc/xinetd.d/rsync
  service rsync
    {
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
        log_on_failure  += USERID
    }

2. Create /etc/rsyncd.conf configuration for rsync in daemon mode.

$ sudo vim /etc/rsyncd.conf
  max connections = 2
  log file = /var/log/rsync.log
  timeout = 300

  [share]
  comment = Public Share
  path = /home/share
  read only = no
  list = yes
  uid = nobody
  gid = nogroup
  auth users = user
  secrets file = /etc/rsyncd.secret

3. Create /etc/rsyncd.secret for pub's password.

$ sudo vim /etc/rsyncd.secret 
  password

4. Start/Restart rsyncd

$ sudo /etc/init.d/rsync start

Testing

Run the following command to check if everything is ok.

$ sudo rsync user@192.168.0.1::share
  Password: 
  drwxr-xr-x        4096 2006/12/13 09:41:59 .
  drwxr-xr-x        4096 2006/11/23 18:00:03 folders


CategoryDocumentation