![]() ![]() If you have not done already, try to ssh to the other side. Asymmetric (private-public key cryptography) will help immensely here. Lsyncd requires rsync to work without user intervention. Step 4: Compose the configuration files on both sides.Step 3: Install lsyncd and its log and status files.Step 2: Setup folders and folder structure.Step 1: Setup ssh passwordless access to servers.The following stages should comprise our plan: On this occasion, we can devise a methodology that should remove an good amount of “oh, my!” moments, or at least keep your calm when stuff is on fire. I always enjoy a good plan especially one that it does not flop or backfire, or both. The latter is needed to make lsyncd behave as close to 2-way sync as possible and avoid an endless sync loop.īoth servers should be accessible via ssh, meaning that service sshd should be running. If you change something on one side, it will affect the other, as a consequence.Īpart from access to the folders of your project, your system account will need to be a sudoer - sudo: superuser do, or saying pleeeaseee in linux lingo :) You will also need access to a folder that resides outside of the project that will be synced. Make sure that your file system structure and your project structure remains concise for every instance/snapshot/release of your project. Please remember that lsyncd is not primarily designed for a 2-way sync and this is as close as it can get to being one. We will try to approach a master-master sync between the hosted project. The scenario covers the use case of two remote servers: ![]() Although not all uses cases can be covered, I will attempt to present some common issues that may arise in the setup with some helpful tips. As it says on the tin, Lsyncd helps sync files from a secure location, to a not-so-secure location. Lsyncd stands for Live Sync Daemon and utilizes the inotify mechanism, while file transfer is realized with rsync (that is a standard command/utility of any linux server). A middle ground, that does pose its caveats, was found to be the Lsyncd daemon. There are a few options out there that could address to the need, and some of them required from moderate setup/effort, all the way to utilizing an full IT team. In layman’s terms, this means that the servers do not heavily change their file content, and when they do, this takes place at moderate times and volumes. Specifically, it involved two CMS web application servers that were ‘slowly changing’. I have recently came across a request/challenge to setup a two-way sync with as less voodoo as possible. ![]()
0 Comments
Leave a Reply. |