This mini how-to provides a comprehensive instruction on how to install Rsync in Debian Lenny (Linux). I’m using Rsync to synchronize files on several servers. Let’s install and configure rsync:
- Install rsynс
apt-get install rsync - Create a configuration file for rsyncd
vi /etc/rsyncd.conf
with the following content:
log file=/var/log/rsyncd
pid file=/var/run/rsyncd.pid
socket options = SO_KEEPALIVE
[www]
comment = public archive
path = /var/www
use chroot = yes
max connections=2
lock file = /var/lock/rsyncd
read only = yes
list = yes
uid = www-data
gid = www-data
auth users = wwwsync
secrets file = /etc/rsyncd.secrets
strict modes = yes
hosts allow = 10.1.1.1 10.1.1.100
ignore errors = no
ignore nonreadable = yes
transfer logging = yes
log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.
timeout = 300
refuse options = checksum dry-run
dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbzin the command hosts allow = you need to specify addresses from which you are going to sync files.
- Create a login and password in /etc/rsyncd.secrets
wwwsync:synhronizer - In the file /etc/default/rsync replace a line RSYNC_ENABLE=false with RSYNC_ENABLE=true
- Run Rsync
/etc/init.d/rsync start - Check if Rsync ran
ps xauw|grep rsync
After the installation you should see the following:
root 3935 0.0 0.3 3368 832 ? S 04:22 0:00 /usr/bin/rsync –no-detach –daemon –config /etc/rsyncd.conf - Start synchronization (login:wwwsync password:synhronizer)
rsync -rvt –progress wwwsync@www.local::www
www.local should be replaced with ip or the server name where you are going to fulfill synchronization.
This is how to install and configure Rsync in Debian Lenny.



Recent Comments