<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">​<div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:monospace,monospace">I personally put a random sleep in my cron call, </span><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="font-family:monospace,monospace">1 * * * * root  sleep $((RANDOM%60)) &amp;&amp; csync2-update</span><br><span style="font-family:monospace,monospace"></span></blockquote><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:monospace,monospace">where csync2 is a wrapper around csync -xv which handle errors and mail notifications.<br><br></span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:monospace,monospace">you can move the sleep into the wrapper script, <br>and only use the delay when there is no tty (which is when the script is called via cron)<br><br></span></div><span style="font-family:monospace,monospace">not perfect, but it works nicely.<br><br><br>--<br></span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:monospace,monospace">Rabin<br></span></div><div class="gmail_default" style="font-family:tahoma,sans-serif">​</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 9, 2016 at 9:47 AM, Гусев Павел <span dir="ltr">&lt;<a href="mailto:pgusev@qsoft.ru" target="_blank">pgusev@qsoft.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi! If you run csync2 -xv on each node, you can get sqlite-database locks. So, if you do not want sqlite-database locks, you can use one of these recomendations:</div><div>1) use csync 2.0, it is possibility to use mysql backend</div><div>2) on each node authorized_keys file and connect to each node from one supermaster node, and run csync2 -xv over ssh in  a cycle, for example:</div><blockquote><div>#!/bin/bash<br>list=&quot;host1 host2 host3&quot;<br>rid=$(date +%s)<br>        LOGS_PATH=/var/log/csync2_master/mainapp<br>        mkdir -p $LOGS_PATH<br>        CUR_DATE=`date +%F`<br><br>        find $LOGS_PATH -type f -mtime +30 -exec rm -f {} \; 2&gt;&amp;1                                                                            | tee -a $LOGS_PATH/last.log<br><br>        for ip in $list;do<br>                echo &#39;============================================================&#39; 2&gt;&amp;1                                                     | tee -a $LOGS_PATH/last.log<br>                echo &#39;Starting &#39;${trid}&#39; sync on &#39;$ip&#39; at &#39;`date` 2&gt;&amp;1                                                                       | tee -a $LOGS_PATH/last.log<br>                timeout 3600 ssh -oStrictHostKeyChecking=no csync2@$ip &quot;timeout 3600 sudo csync2 -xv&quot; 2&gt;&amp;1                                                             | tee -a $LOGS_PATH/last.log<br>                echo &#39;Finishing &#39;${trid}&#39; sync on &#39;$ip&#39; at &#39;`date` 2&gt;&amp;1                                                                      | tee -a $LOGS_PATH/last.log<br>                echo &#39;============================================================&#39; 2&gt;&amp;1                                                     | tee -a $LOGS_PATH/last.log<br>        done<br>        echo -e &quot;*****************************************************************************************************************\n&quot; 2&gt;&amp;1   | tee -a $LOGS_PATH/last.log<br>        sleep 60;</div></blockquote><div>3) if you do not want previously choices, you can use csync2 -Bxv (key B - do not lock sqlite-database, but you can get bad data in database or crashed db-file)</div><div> </div><div>Paul Goosev</div><div> </div><div> </div><div> </div><div>08.06.2016, 18:50, &quot;Rabin Yasharzadehe&quot; &lt;<a href="mailto:rabin@isoc.org.il" target="_blank">rabin@isoc.org.il</a>&gt;:</div><blockquote type="cite"><div><div><div><div style="font-family:tahoma,sans-serif">check the manual - <a href="http://oss.linbit.com/csync2/paper.pdf" target="_blank">http://oss.linbit.com/csync2/paper.pdf</a></div><div style="font-family:tahoma,sans-serif">just note that csync2 works by pushing changes, so you&#39;ll need to run the sync command on each node, to sync both sides.</div></div><div><br><div>On Wed, Jun 8, 2016 at 1:12 PM, Solanellas Llobet, Xavier <span>&lt;<a href="mailto:xavier.solanellas@esade.edu" target="_blank">xavier.solanellas@esade.edu</a>&gt;</span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="ES"><div><p><span lang="EN-US">Hi,<u></u><u></u></span></p><p><span lang="EN-US">I would like to configure 2 servers Master-Master using csync2 in RedHatLinux.<u></u><u></u></span></p><p><span lang="EN-US">Do you have a document with step by step to configure 2 servers?<u></u><u></u></span></p><p><span lang="EN-US"><u></u> <u></u></span></p><p><span lang="EN-US">Thanks.<u></u><u></u></span></p></div></div><br>_______________________________________________<br> Csync2 mailing list<br> <a href="mailto:Csync2@lists.linbit.com" target="_blank">Csync2@lists.linbit.com</a><br> <a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br> </blockquote></div></div></div></div>,<span><p>_______________________________________________<br>Csync2 mailing list<br><a href="mailto:Csync2@lists.linbit.com" target="_blank">Csync2@lists.linbit.com</a><br><a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a></p></span></blockquote></blockquote></div><br></div></div>