Hello all,

I have two web servers both mounting the same file system (with GFS). I have a third web server which is independent from the first two, using only its own local file systems. I need to mirror a directory within the shared file system on the first two web servers to the local file system on the third web server. To maintain redundancy, both of the first two web servers will be pushing the files to the third web server via rsync started up by cron as well as on-demand by the web developers.

My concern is that if rsync is running on the first two web servers at the same time, that there may be a chance for the two rsync sessions to write to the same file(s) on the third web server at the same time, possibly corrupting the files or interrupting the transfers.

Is there any sort of locking mechanism built in into rsync to prevent this from happening? Would running an rsync daemon on the third web server versus running it under an ssh shell make any difference to this? Has anyone else worked around this type of problem before and what solution did you use? I was thinking of having the scripts on the first two web servers refer to a lock file before firing up rsync, but was hoping there was something built in to rsync to avoid this added complexity.

Thanks in advance for any advice,
Andrew

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to