I have two webapp, old one is WS1 and the new version is WS2. Now I want to synchronize pictures/attachments from WS1 to WS2 to keep both running. I found some tools like lsyncd / unison / GlusterFS. lsyncd is pretty handy but I found some issues please help.

  1. I see some tutorials about setup lsyncd for two webserver. But can we install package like lsyncd in the server hosted in the cloud? Like AWS. Do we have root to do it? If not then how could I setup it?

  2. After trying lsyncd, It works well locally. But I found that if the server is down or lsyncd restarts, it will synchronize WS1 and WS2 folders exactly same. If I have some files in WS2 that WS1 doesn't have, then these files will be deleted when restart lsyncd. How to avoid this? Since there will be new files in WS2.

  3. lsyncd is one-way synchronize, is there two-way reliable solution? Or is there a better way rather than synchronize? Like sharing one file server?

Thanks for reading the long question. Appreciate any help.

1 Answer 1


on point #2 - you can try
rsync = {
_extra = { "-ausS", "--temp-dir=/tmp", "-e", "ssh -p 22" }
option. https://github.com/axkibe/lsyncd/issues/191 for reference. point #2 should resolve #3 hopefully


-u, --update This forces rsync to skip any files for which the destination file already exists and has a date later than the source file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .