12 Feb

Quick rsync server setup on Linux box

This goes to your /etc/rsyncd.conf:

log file = /var/log/rsyncd.log
transfer logging = true

[home]
path = /home/
uid = apache
gid = apache
read only = no
list = yes
comment = home
auth users = web
secrets file = /etc/rsyncd.passwords
hosts allow = 192.168.1.1/32
hosts deny = 0.0.0.0/0

To launch run:

rsync --daemon

/etc/rsyncd.passwords is plain text file with passwords in format:

username:password

For example,

tales:P@ssW0Rd

Using it:

rsync -av  /home/ [email protected]::home/

To test add –dry-run option. It will not make any changes. This is it.