I want to synchronize a directory on the server A to a server B.
On the server A I created a file rsyncd.conf
with the content:
uid = rsync
gid = rsync
use chroot = no
pid file = /var/run/rsyncd.pid
[share]
comment = share
path = /etc/dirtosync
read only = false
list = yes
hosts allow = *
auth users = rsync
secrets file = /etc/rsyncd.secrets
And I created on the server A the file /etc/rsyncd.secrets
with the content:
rsync:rsync
I also created on the server A the pid file, and the user rsync with the password rsync.
On the server A, on the file: /etc/default/rsync
I put the value RSYNC_ENABLE
to true
and I started the rsync daemon with the command:
/etc/initd/rsync start
On the server A and the server B the owner and the group of the directory is rsync.
I launched on the machine B the command:
rsync -avzr rsync@<serverA>:/etc/dirtosync/* /etc/dirtosync/
I also tried on the server A the command
rsync -avzr /etc/dirtosync/* rsync@<serverB>:/etc/dirtosync/
With this two commands the result is the same: the files are synchronized just one time when I launch the command but after if I modify the files in the server A they aren't synchronize to the server B
Do I have to do something else to keep the file synchronized?