You can synchronize data and metadata between different DHIS2 instances. Given two instances in a central-local deployment strategy, metadata created at the central system can be synchronized with the local system and the data created at local system can be synchronized with the central system. This can be useful when you’ve multiple stand-alone instances of DHIS2 and global metadata needs to be created at all the local instances.
If metadata creation and update take place at the central system and if the metadata synchronisation task is enabled, the metadata gets synchronized down to all the local instances which are bound to the central instance. These local instances will in turn push data values to the central instance. Enabling or disabling versioning of metadata synchronization at local instance, will not hinder the metadata synchronization process. This is because the metadata synchronization interacts with versioning end points of the central instance and not with end points of the local instance.
Each snapshot of metadata export generated is referred to a metadata version. A new metadata version contains only the changes between the previous version and the current version, that is it’s an export between two timestamps. All metadata versions are maintained in the DHIS2 database and are available to all local instances that connect to it. You can schedule each of the local instances to download new metadata versions. It is recommended to keep the metadata versions’ sizes small and logical.
Each instance of DHIS2, whether central or local, can create metadata versions. The local instance is meant to synchronize metadata from a central system and not create metadata on its own.
If a new metadata version is created on the local instance, this instance can’t receive new metadata versions from the central instance, since the content of the metadata versions will be out of synchronization.
If you’ve created metadata versions on a local instance, you must manually deleted these versions from the database before you can synchronize with the central instance.
Assume the central and local DHIS2 instances have identical metadata snapshots until version 10. Then the local instance creates a new snapshot called version 11. After that, the central instance creates a new snapshot called version 11. When the local instance attempts to synchronize metadata, version 11 is not downloaded. However, the content of version 11 on the local instance is not identical to the content of version 11 on the central instance.
You can also use the Import-Export app to synchronize metadata manually.