rsync server

mirrors

Posted by JXLIU on November 4, 2022

rsyncd configuration

/etc/rsyncd.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# /etc/rsyncd.conf

# Minimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help

# This line is required by the /etc/init.d/rsyncd script
pid file = /run/rsyncd.pid
log file = /var/log/rsyncd.log
use chroot = yes
read only = yes

# Simple example for enabling your own local rsync server
#[gentoo-portage]
#       path = /var/db/repos/gentoo
#       comment = Gentoo ebuild repository
#       exclude = /distfiles /packages
[sync]
        path            =/home/lug/mirrors/mirror_data/
        include from    =/home/lug/mirrors/mirror_data/rsync.list
[gentoo-portage]
        path            =/home/lug/mirrors/mirror_data/gentoo-portage
        include from    =/home/lug/mirrors/mirror_data/gentoo-portage.list

rsync.list

1
/home/lug/mirrors/mirror_data/***

start server and test

1
2
3
4
rc-service rsyncd start
jxliu@mhd ~ $ rsync mhd.hust.edu.cn::
sync           
gentoo-portage