LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to configure rsync? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-rsync-774116/)

Makri 12-07-2009 10:09 PM

How to configure rsync?
 
Hi,
Can you guys tell me how to configure rsync on redhat linux?

I have installed rsync rpm package. I am looking for rsync file in /etc...But I could not find any file related to rsync in /etc... I can see one file in /etc/xinetd.d... thats it...

How do I set up ?


Thank you,

jhwilliams 12-07-2009 10:12 PM

The file is named /etc/rsyncd.conf, and its description is in the rsyncd.conf(5) man page.

On redhat you should be able to turn the rsyncd daemon on via the service or chkconfig utilities. It can be started/stopped explicitly as /etc/init.d/rsync start|stop|restart etc.

bit-head 12-07-2009 10:35 PM

rsyncd.conf
 
It really depends on what you want to do. Do you want to set up a server that serves up a specific directory for a specific user? Let's say you want to set up a module named "archive" that points to a directory "/usr/local/archive" so you can make sure you archive important data regularly. You can set up a user called "archie" with a group id of the same name if you want. This example below shows you what to put in /etc/rsyncd.conf. This is assuming the xinetd is set up properly and your firewall allows rsync from the client host to the server.

let's call the rsync server "serverA" and the archive repository "repoB".

With this example, on serverA, create a file called 'rsyncd.conf' in the /etc/ dir (i.e. /etc/rsyncd.conf) and edit it:

Code:

        uid = archie
        gid = archie
        use chroot = no
        read only = yes
        [archive]
          path = /usr/local/archive

This will enable the client machine to connect to the rsync server as user archie and specify "archive" as the module which simplifies things a little.

On repoB if you want to rsync to a directory called "/var/serverA/archive, the rsync command would be:

Code:

  rsync -av serverA::archive /var/serverA/archive/
And that should just about do it. Keep in mind rsync comes with a VERY useful man page as well so I would dig in there as well. I hope this at least gets you started!

Cheers!

bit-head


All times are GMT -5. The time now is 10:01 PM.