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:
1) use csync 2.0, it is possibility to use mysql backend
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:
#!/bin/bash
list="host1 host2 host3"
rid=$(date +%s)
        LOGS_PATH=/var/log/csync2_master/mainapp
        mkdir -p $LOGS_PATH
        CUR_DATE=`date +%F`

        find $LOGS_PATH -type f -mtime +30 -exec rm -f {} \; 2>&1                                                                            | tee -a $LOGS_PATH/last.log

        for ip in $list;do
                echo '============================================================' 2>&1                                                     | tee -a $LOGS_PATH/last.log
                echo 'Starting '${trid}' sync on '$ip' at '`date` 2>&1                                                                       | tee -a $LOGS_PATH/last.log
                timeout 3600 ssh -oStrictHostKeyChecking=no csync2@$ip "timeout 3600 sudo csync2 -xv" 2>&1                                                             | tee -a $LOGS_PATH/last.log
                echo 'Finishing '${trid}' sync on '$ip' at '`date` 2>&1                                                                      | tee -a $LOGS_PATH/last.log
                echo '============================================================' 2>&1                                                     | tee -a $LOGS_PATH/last.log
        done
        echo -e "*****************************************************************************************************************\n" 2>&1   | tee -a $LOGS_PATH/last.log
        sleep 60;
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)
 
Paul Goosev
 
 
 
08.06.2016, 18:50, "Rabin Yasharzadehe" <ra...@isoc.org.il>:
just note that csync2 works by pushing changes, so you'll need to run the sync command on each node, to sync both sides.

On Wed, Jun 8, 2016 at 1:12 PM, Solanellas Llobet, Xavier <xavier.solanel...@esade.edu> wrote:

Hi,

I would like to configure 2 servers Master-Master using csync2 in RedHatLinux.

Do you have a document with step by step to configure 2 servers?

 

Thanks.


_______________________________________________
Csync2 mailing list
Csync2@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/csync2
,

_______________________________________________
Csync2 mailing list
Csync2@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/csync2

_______________________________________________
Csync2 mailing list
Csync2@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/csync2

Reply via email to