Local Data Mirroring with CommCare
Some projects have data residency or compliance requirements that require data to be stored locally rather than in the cloud. Local data mirroring allows organizations to use CommCare’s secure cloud platform while maintaining a copy of their data in a local database of their choice.
Organizations can use CommCare for application management, data collection, syncing, and integrations, while replicating data to a local database using tools like the open-source CommCare Data Export Tool (DET).
Technical Implementation
Below are the steps to set up local data mirroring with your CommCare projects.
Should you require more support please, please refer to the
Developers forum or reach out to a CommCare Provider below.
Step 1: Procure a Local Server
First, follow Phases 1 and 2 of this detailed guide to help you plan for and choose a local server. You do not need to plan for a replica of CommCare HQ.
Step 2: Build on CommCare’s Cloud
Next, sign up and build applications on CommCare’s cloud. Once you create an account, you get immediate access to the platform on Dimagi’s production servers, where you can start building, testing, and deploying mobile applications.
Data is automatically stored in our secure cloud databases on AWS, which offer unlimited storage and are HIPAA compliant, GDPR aligned, SOC 2, and ISO compliant.
Step 3: Build an Integration Pipeline
Set up a data pipeline between the cloud platform and your local database using the CommCare Data Export Tool (DET) or another integration layer.
The Data Export Tool (DET) is built to pull data from CommCare’s cloud into many formats and destinations, including CSV, XLSX, SQL, Oracle, and more. You can schedule it to run as often as you like to keep your local data up to date.
(Optional) Step 4: Data Cleaning and Retention
Beyond setting up the local database, an administrator can configure data cleaning and retention rules so only relevant data stays in the cloud long-term. A few options:
Automatically Update Cases to close cases after a set time
Archive Forms or Delete Forms forms after a set time
Implement Case Deduplication by reviewing the system’s suggested duplicates
Manually pursue Data Removal options to remove users who haven’t used the sytesm for some time.