Datacenter to datacenter replication administration

    This section includes information related to the administration of the datacenterto datacenter replication.

    For a general introduction to the datacenter to datacenter replication, pleaserefer to the chapter.

    Once all components of the ArangoSync solution have been deployed and arerunning properly, ArangoSync will not automatically replicate database structureand content. For that, it is is needed to configure synchronization.

    To configure synchronization, you need the following:

    • The endpoint of the sync master in the target datacenter.
    • The endpoint of the sync master in the source datacenter.
    • A certificate (in keyfile format) used for client authentication of the sync master(with the sync master in the source datacenter).
    • A CA certificate (public key only) for verifying the integrity of the sync masters.

    With that information, run:

    The command will finish quickly. Afterwards it will take some time untilthe clusters in both datacenters are in sync.

    1. --master.endpoint=<endpoints of sync masters in datacenter of interest> \
    2. --auth.user=<username used for authentication of this command> \
    3. --auth.password=<password of auth.user> \
    4. -v

    Note: Invoking this command on the target datacenter will return different results frominvoking it on the source datacenter. You need insight in both results to get a “complete picture”.

    Where the get status command gives insight in the status of synchronization, thereare more detailed commands to give insight in tasks & registered workers.

    Use the following command to get a list of all synchronization tasks in a datacenter:

    Use the following command to get a list of all masters in a datacenter and know which master is the current leader:

    1. arangosync get masters \
    2. --auth.user=<username used for authentication of this command> \
    3. -v

    Use the following command to get a list of all workers in a datacenter:

    If you no longer want to synchronize data from a source to a target datacenteryou must stop it. To do so, run the following command:

    1. arangosync stop sync \
    2. --master.endpoint=<endpoints of sync masters in target datacenter> \
    3. --auth.user=<username used for authentication of this command> \

    The command will then wait until synchronization has completely stopped before returning.If the synchronization is not completely stopped within a reasonable period (2 minutes by default)the command will fail.

    If you do not want to wait for all shards in the receiving cluster to becompletely in-sync with the shards in the sending cluster, add an —ensure-in-sync=falseargument to the stop sync command.

    If the source datacenter is no longer available it is not possible to stop synchronization ina graceful manner. If that happens abort the synchronization with the following command:

    If the source datacenter recovers after an abort sync has been executed, it isneeded to “cleanup” ArangoSync in the source datacenter.To do so, execute the following command:

    1. arangosync abort outgoing sync \
    2. --master.endpoint=<endpoints of sync masters in source datacenter> \
    3. --auth.user=<username used for authentication of this command> \

    If you want to reverse the direction of synchronization (e.g. after a failurein datacenter A and you switched to the datacenter B for fallback), youmust first stop (or abort) the original synchronization.

    Once that is finished (and cleanup has been applied in case of abort),you must now configure the synchronization again, but with swappedsource & target settings.