[CentOS-mirror] rsync

Andrew Holland Andrew.holland at academica.fi
Wed Feb 9 13:33:36 EST 2011


Date: Wed, 09 Feb 2011 17:16:04 +0100
From: Ji?? Sl??ka <jiri.slezka at slu.cz>
Subject: Re: [CentOS-mirror] Rsync now supported for
        mirror.academica.fi
To: centos-mirror at centos.org
Message-ID: <4D52BDC4.9060207 at slu.cz>
Content-Type: text/plain; charset="utf-8"

hello andrew

> A short note that we have now enabled rsync functionality for mirror.academica.fi .

could you help me?

is there some special rules about making rsync mirror or something like 
this is sufficient? (taken from fedora mirror howto)


To be honest I'm not sure.  I looked for a LONG time to find any official documentation, but didn't really find any.  For any distribution.

I took a combination of Fedora, Gentoo, and Debian documents and came up with what I am using.

Here's what I have done:

1. Install xinetd.
2. Configure rsync in xinetd.
  - Basically, the Centos setup just needs to be changed so 'disable' is 'no.'
3. create /etc/rsyncd.conf

you can use man rsyncd.conf for the syntax and various bits there, including an example.  I started with the example from the manpage and added some items:

I changed 'use chroot' to yes (the example said 'no.')

I changed the max connections to 15.  (I'd be more than happy to discuss numbers here.)

I turned transfer logging on:
--
transfer logging = yes
log file = /var/log/rsync.log
log format = %t %a %m %f %b
--
These suggestions came from the Gentoo pages, and suggested that log format to provide better logging with the chroot.

I added a timeout and a motd:
--
motd file = /etc/motd.rsync
timeout = 300
--

Following this, I placed lines for each of the 'sections' that we have.

For CentOS, I used:

[CentOS]
path = /path/to/mirrors/CentOS
comment = full Centos mirror

---
4. I checked that xinitd was set to restart in runlevels 3 and 5 with chkconfig.
5. I started xinitd.
6. I tested:
  A. does rysync itself work?

rsync rsync://mirror.academica.fi/

(this shows the MOTD, and each of the sections I added, and the description.)

  B. does rsync transfer work FROM the server?

  C. is rsync transfer TO the server rejected?

I'm not including command lines for how to do those tests, but you should check these before going 'live.'

>
> [fedora]
>         comment         = Fedora - RedHat community project
>         path            = <path to your fedora directory>
>         exclude         = lost+found/
>         read only       = true

The default is read only, incidentally.  It may be a good idea to specifically state 'read only' however.

>         max connections = 100
>         lock file       = /var/run/rsyncd-mirrors.lock
>         uid             = <user id (numeric, or textual) of an 
> anonymous style user who should have read access>
>          gid             = <group id (numeric, or textual) of an 
> anonymous style user who should have read access>
>         transfer logging = yes
>         timeout         = 900
>         ignore nonreadable = yes
>         dont compress   = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
>         refuse options = checksum
>
>thanks
>
>Jiri Slezka


More information about the CentOS-mirror mailing list