The process which does Metadata Synchronization is referred as Metadata Sync Task. This task performs a series of steps before syncing of metadata
Data push (aggregate data and anonymous events data) from local instance to central instance.
Gets the current metadata version of the local instance. Then uses this version information as a baseline to fetch the list of metadata versions created after the baseline.
If there are new versions created at central instance, it performs the sync of metadata versions one after the other. A mail will be sent to the configured user (see Section 29.5, “Configure Local Instance”) after each successful sync of metadata version at the local instance.
This task is scheduled using the Data Administration app.
Go to Data Administration app > Scheduling. Under Metadata Synchronization, set metadata synchronization strategy to Enabled, and then select appropriate time/ time period for scheduling and click Start. Alternatively, metadata can be synced instantly from one system to another using the "Sync Now" button. For this, scheduling is not required.
Once this task is run at the scheduled time, this task has the ability to retry (if any of the steps fail) based on the configuration of below parameters as defined in dhis.conf file.
metadata.sync.retry = 5
metadata.sync.retry.time.frequency.millisec = 10000
If no values are specified then the default values are
metadata.sync.retry = 3
metadata.sync.retry.time.frequency.millisec = 30000
Each retry will be made after the time (in millisecond) as specified. If the steps still fail even after all the retries, then the scheduler stops its execution and then a mail will be sent to the configured user (see Section 29.5, “Configure Local Instance”)