DHIS2 provides a feature for synchronizing data being captured on the local instance with a another, remote instance of DHIS2. This can be useful e.g. when you have deployed multiple stand-alone instances of DHIS2 which are required to submit data values to a central DHIS2 instance. Till now only aggregate data was being synced. Starting from 2.24 even non anonymous events data (line list) will also be synced.
These are the steps to enable data synchronization:
Go to Settings > Synchronization, enter the remote server URL, username and password and click Save. You can test your settings by clicking on the “Test settings” link.
Go to Data administration > Scheduling. Under Data synchronization set strategy to Enabled, and click Start.
Some aspects of the data synchronization feature to be aware of:
The local DHIS2 instance will store the password of the user account on the remote instance encrypted in the local database. The remote account is used for authentication when transferring data. For security purposes make sure you set the “enryption.password” configuration parameter in hibernate.properties to a strong password.
Deploying the remote server on SSL/HTTPS is strongly recommended as the username and password are sent in clear text using basic authentication and could be intercepted by an attacker.
The data synchronization uses the UID property of data elements, category option combos and organisation units to match the meta-data. Hence the synchronization is dependent on these three meta-data objects being harmonized on the local and remote instance in order to work appropriately.
The very first time DHIS2 attempts to synchronize data the system will include data entered during the last three days. For the subsequent attempts the system will store the time of the last successful data synchronization and only include data saved or edited since that time. A synchronization job is considered successful only if data was submitted, authenticated and saved successfully on the remote server,.
The system will attempt a synchronization every minute. If the local server does not have a working Internet connection at the time, the synchronization will be silenly aborted and re-attempted after a minute.
You can see the time of last successful synchronization with remote server in the scheduling screen next to the “Last success” label.