Hello,

I appologise if this is FAQ.

I have been mirroring a web site between two servers, where the filea have
varying
permisions, owners and groups. But they have the same UID/GIDs on both
systems.

I have been using the following command.

rsync --verbose --progress --stats --rsh=/usr/bin/ssh --recursive --times
--perms --owner --group --links --delete
--exclude-from=/home/web/rsync-excludes.txt . rigel:/home/html

And this has been working fine. But I really need to automate this.
Curently I run this
as root, and I get asked for root's password on rigel.

I been playing with rsync, but no joy. Basically I want to accomplish the
above, but
without using ssh.

As a test I setup the following.

On server1 I created a /etc/rsyncd.conf like
       pid file = /var/run/rsyncd.pid
       log file = /var/log/rsyncd 

      [test]
        path = /usr/local/rsync-test
        comment = test
        auth users = root 
        secrets file = /etc/rsyncd.secrets
        read only = no

and a /etc/rsyncd.secrets containg root:password

I then ran rsync --daemon

>From server2 in the /root/test directory I have a number of c files.

The best I can seem to do is if I make the /usr/local/rsync-test directory
on server1
mode 1777 ala drwxrwxrwt,
then from /root/test on server 2 run the command rsync --owner --group *.c
server1::test

it copies the files accross but they get owner of nobody and the group of
root.
Instead of root.root.

There must be some way of doing this the so the directory can have normal
permisions, ie without the sticky bit and keeping the owner and group.


Any pointers would be greatly appreciated and if you could CC me any
replies, as
I'm not on the list.


Thanks,

Andrew Clayton






Reply via email to