rsync server.

I am adding very brief info here, will try to add details regarding options used when have time.

Server=http://anuj.sytes.net (Red Hat Enterprise Linux 5)

Client=any other unix based machine.

On the rsync server

Create  /etc/rsyncd.conf

uid = nobody
gid = nobody
use chroot = no
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid
[ftp]
path = /var/ftp/pub/xyz
hosts allow = 87.227.31.168
auth users =  anujhere
read only = false
write only = false
secrets file = /etc/rsyncd.secrets
comment = whole ftp area (approx 6.1 GB)

Create /etc/rsyncd.secrets file

anujhere:p@ss

Enable rsync service by editing /etc/xinetd.d/rsync, change `disable = yes` to `disable = no`

# default: off
# description: The rsync server is a good addition to an ftp server, as it \
#       allows crc checksumming etc.
service rsync
{
disable = no
socket_type     = stream
wait            = no
user            = root
server          = /usr/bin/rsync
server_args     = --daemon
log_on_failure  += USERID
}
Reload/Restart the xinetd service:

/sbin/service xinetd restart

On the host

Create a password file. say ~user/.rhosts with password.

p@ss

chmod 600 ~user/.rhosts

Copy files from rsync server to host

rsync --password-file ~anujhere/.rhosts -rcvh rsync://anuj.sytes.net/ftp /path/to/destination

Copy files from host to rsync server

rsync –password-file ~anujhere/.rhosts -rcvh . rsync://anuj.sytes.net/ftp

Anuj Singh

About anuj

Don't go for looks; they can deceive. Don't go for wealth; even that fades away. Go for someone who makes you smile because it takes only a smile to make a dark day seem bright.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>