Hi, <br><br>I cloned csync2 repository(latest) and built an rpm on centos5. <br><br>csync2 worked properly the first time but thereafter it is giving errors.<br><br> i think csync2 is copying the file to the slave only when it is not present on slave, if the file is also present on the slave, then it is giving the error:<br>

<br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">While syncing file /opt/test/yum.log: ERROR from peer(/opt/test/yum.log): <a href="http://slave.abc.com">slave.abc.com</a><br>

</blockquote><br>If the file is present on both master and slave but is modified on the master, then the error is:<br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

While syncing file /opt/test/db.c:<br>ERROR from peer(/opt/test/db.c): <a href="http://slave.abc.com">slave.abc.com</a> Stating original file /opt rc: 0 mode: 40755<br>Auto-resolving conflict: Won &#39;master/slave&#39; test.<br>

While syncing file /opt/test/db.c:<br>ERROR from peer(/opt/test/db.c): <a href="http://slave.abc.com">slave.abc.com</a> Changing owner of /var/backups/csync2/opt to user 0 and group 0, rc= 0 <br>ERROR: Auto-resolving failed. Giving up.<br>

ERROR from peer(&lt;no file&gt;): <a href="http://slave.abc.com">slave.abc.com</a> Changing mode of /var/backups/csync2/opt/test/db.c to mode 33188, rc= 0 <br></blockquote><br>Please note that I modified the file /opt/test/db.c<br>

<br>When I ran csync2 -T, the output is:<br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">X    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/db.c<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/maillog.1<br>L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/messages.1<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/rpmpkgs.1<br>L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/rpmpkgs.2<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/rpmpkgs.3<br>L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/rpmpkgs.4<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/scrollkeeper.log<br>L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/secure.1<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/snmpd.log<br>L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/spooler.1<br>

L    <a href="http://master.abc.com">master.abc.com</a>    <a href="http://slave.abc.com">slave.abc.com</a>    /opt/test/yum.log<br></blockquote><br>Here is my csync2 configuration file:<br><br>================================================================<br>

<br># Csync2 Configuration File<br># ---------------------------------<br>#<br># Please read the documentation:<br># <a href="http://oss.linbit.com/csync2/paper.pdf">http://oss.linbit.com/csync2/paper.pdf</a><br>nossl * *;<br>

group smgr<br>{<br>        host <a href="http://master.abc.com">master.abc.com</a>;<br>        host (<a href="http://slave.abc.com">slave.abc.com</a>);<br><br>        key /etc/csync2.key;<br><br>        include /opt/test;<br>

<br>        backup-directory /var/backups/csync2;<br>        backup-generations 3;<br><br>        auto left;<br>}<br><br><br>Csync2 1.34 is working properly but the latest git codebase is giving this error. Am I doing something wrong or is this a regression issue? If it is a regression issue, then I can test and verify a patch if you can provide one (may be i can try if some hints can be given, but i&#39;m not so good at C, hence hesitation :) ).<br>

<br>Thanks and Regards,<br>Samba<br><br><br>PS:<br><br>I had faced another minor issue with the latest codebase from Git where it complained &quot;no such column: TRUE&quot; pointing to the line:218 in the file check.c.<br>

 Here is the code snippet that is responsible for that:<br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">void csync_check_del(const char *file, int recursive, int init_run)<br>

211 {<br>212         char *where_rec = &quot;&quot;;<br>213         struct textlist *tl = 0, *t;<br>214         struct stat st;<br>215 <br>216         if ( recursive ) {<br>217                 if ( !strcmp(file, &quot;/&quot;) )<br>

218                   ASPRINTF(&amp;where_rec, &quot;OR TRUE&quot;);<br>219                 else<br>220                   ASPRINTF(&amp;where_rec, &quot;UNION ALL SELECT filename from file where filename &gt; &#39;%s/&#39; &quot;<br>

221                                 &quot;and filename &lt; &#39;%s0&#39;&quot;,<br>222                                 url_encode(file), url_encode(file));<br>223         }<br>224 <br>225         SQL_BEGIN(&quot;Checking for removed files&quot;,<br>

226                         &quot;SELECT filename from file where &quot;<br>227                         &quot;filename = &#39;%s&#39; %s ORDER BY filename&quot;, url_encode(file), where_rec)<br>228         {<br></blockquote>

<br>I had changed &quot;OR TRUE&quot; to &quot;OR 1=1&quot; which I think would work on all the databases.<br><br>I&#39;m using sqlite3, and the issue may be with the standard compliance of sqlite3 but I think it is better to go with minimum common denominator and hence would suggest to use &quot;OR 1=1&quot; instead of &quot;OR TRUE&quot; in the above mentioned context.<br>