[Csync2] auto younger not working

prashant prashant at bluebarracuda.com
Tue Jul 10 11:31:25 CEST 2007


Hi there,

I have been using csync2 for 1 week now and did not encounter any issue.
It very stable and robust and allows you to have much control over 
synchronization.

However, i am doing some test with "auto younger" for conflict 
resolution, and having the following issues

1. What i did is modified a file on db2 and ran csync2 -xv on db1 -  and 
my expected result would be that
     the file should be copied to db1 - is that right or i am wrong, 
csync2 does not do that?
     Or is there something i am missing to get this working??

2. I modified a file on db1 and after a few seconds modified the same 
file on db2 and ran csync -xv on db1.
    My expected result would be the file from db2 should be copied to 
db1 with file on db2 winning as its younger...
    but i get the result below

root at db1:/var/dir# csync2 -xv
Marking file as dirty: /var/dir/z1
Connecting to host db2 (SSL) ...
Updating /var/dir/z1 on db2 ...
While syncing file /var/dir/z1:
ERROR from peer db2: File is also marked dirty here!
Do not auto-resolve conflict: Lost 'younger/older' test.
File stays in dirty state. Try again later...
Finished with 1 errors.
root at db1:/var/dir#

my csync2.cfg

root at db1:/var/dir# more /etc/csync2.cfg

# Csync2 Example Configuration File
# ---------------------------------
#
# Please read the documentation:
# http://oss.linbit.com/csync2/paper.pdf

 group webservers
 {
        host db1;
        host db2;
#       host web2;

        key /etc/cy.key;

        include /var/dir;
#       include %homedir%/bob;
#       exclude %homedir%/bob/temp;
#       exclude *~ .*;

#       action
#       {
#               pattern /etc/apache/httpd.conf;
#               pattern /etc/apache/sites-available/*;
#               exec "/usr/sbin/apache2ctl graceful";
#               logfile "/var/log/csync2_action.log";
#               do-local;
#       }

#       backup-directory /var/backups/csync2;
#       backup-generations 3;

        auto younger;
 }

# prefix homedir
# {
#       on host[12]: /export/users;
#       on *:        /home;
# }


Is there something i am missing, or completely not understanding csync2.

Many thanks
Prashant



More information about the Csync2 mailing list