 This mini how-to provides a comprehensive instruction on how to install rsync in Debian Lenny. I’m always using rsync to sync files on several servers I maintained. Let’s install and configure rsyncd server :
This mini how-to provides a comprehensive instruction on how to install rsync in Debian Lenny. I’m always using rsync to sync files on several servers I maintained. Let’s install and configure rsyncd server :
- Install rsync
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 *.tbz 
- 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 If nothing go wrong, you should see the following message : 
 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 [email protected]::www www.local should be replaced with the ip or server name on which you are going to fulfill synchronization. 
Done. Now the rsync server ready to serve.
 
                                                     
                                                    