Rsync настройка демона под Gentoo

Материал из AlexNook
Перейти к навигацииПерейти к поиску

Сперва устанавливаем, если пакет ещё не стоит:

emerge -pv rsync}

При этом используются следующие USE флаги суммарно (я их не менял. Это вариант по-умолчанию):

Use Flags: acl iconv ssl xattr (?)


Затем настраиваем конфиг

nano /etc/rsyncd.conf
File: /etc/rsyncd.conf
# /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


#Sync OKBM backups
[okbmbackup]

	# Log file
	log file = /var/log/rsyncd.log

	# Write to log about all downloading files
	transfer logging = true

	#path to files to backup
	path = /home/alex/backup/

	#comment =)
	comment = backups from OKBM DEV, STEP, GUR docker containers

	#working in cage
	use chroot = yes

	#Disallow writing to out folder. only reading files
	read only = yes

	#allow files listing
	list = yes

	#user and group from whitch we will work on rsync server after connecting
	uid = alex
	gid = users

	#white list of hosts
	hosts allow = 10.8.0.1

	#black liat of hosts (deny the rest)
	hosts deny  = *

	ignore errors = no
	ignore nonreadable = yes
	timeout = 3600


	dont compress = *.jpg *.avi *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz

	#user for login to rsync (make init auth)
	auth users = LOGIN

	#path to password file for init auth
	secrets file = /home/alex/.rsync/rsyncd.scrt

Создаём файлик с паролем:

touch /home/alex/.rsync/rsyncd.scrt

ограничиваем на него права

chmod 600 /home/alex/.rsync/rsyncd.scrt
File: /home/alex/.rsync/rsyncd.scrt
LOGIN:PAROL

Добавляем в автозапуск:

{root

И стартуем rsync:

/etc/init.d/rsyncd start


Настройка клиента под Gentoo описано вот тут: Rsync_установка_и_настройка_под_Zyxel_Keenetic_Giga