Tools

Data synchronization

Estimated reading: 2 minutes

This is a guide to data synchronization using the master-slave method.

Step 1: Master and slave

First of all, it must be ensured that the respective “sync-mode” environment variable is set correctly. Under admin->Setup->UmgVar:

sync-mode=0 auf dem Master-System
sync-mode=1 auf dem Slave-System

The following settings must then be made identically on both systems (master and slave): Activation of the “sync” option for the desired data or tables “admin->Tables->{Tables_Group}”

In this example, the “CUSTOMERS” table from the “Example CRM” table group is to be synchronized. A reset is required after this step.

Step 2: Synchronization template

Create a synchronization template: “admin->Tools->Synchronization->templates” on both systems. Enter the name of the template and click on “Add”. The newly created template can now be edited by clicking on the “pencil icon”. All tables selected in step 1 should appear in green. Individual fields can now be selected for synchronization by expanding the table. For double-sided synchronization of the data, both fields (master and slave) must be selected; for single-sided updating, only one of the two fields must be selected. The selection is confirmed by clicking on “Apply”.

Under “Conflict Mode”, the behaviour of the synchronization in the event of a conflict can be defined. There are 4 options:

  • master: Master wins
  • slave: slave wins
  • date: The last edited data record is applied
  • manual: No changes are made and the status report indicates a manual check

In this example, the fields “NAME”, “STREET” and “CITY” from the “CUSTOMERS” table are to be synchronized on both sides. The settings are saved in the previously created template “test_kunden”.

Step 3: Specify client(s)

This setting should only be made on the master system. An entry must be made for each slave in “admin->Tools->Synchronization->Clients”. “Username” and ‘Password’ must be those of an administrator.

Step 4: Create system job

As with step 3, this step should only be carried out on the master system. Under “admin->Tools->System-Jobs->Periodic->datasync.lib” select the template just created and click on “Add job”.

To execute the job immediately, click on “start”.

Share this Doc

Data synchronization

Or copy link

CONTENTS