...
New community supported open source tool
...
Excerpt |
---|
CommCare Sync is a self-hosted, standalone, web-based app that can be used to manage a CommCare “data warehouse.” It’s a suite of configurations, with an improved UX from the command-line Data Export Tool. This turn-key tool allows you to export your data from CommCare and save it to a local or cloud-based database (MySQL, PostgresSQL, Amazon RDS, GCP Cloud SQL, Azure SQL Database). |
...
...
Table of Contentstoc | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Multiexcerpt include macro | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Installation
If you wish to try out, or self-host CommCare Sync, you can do so by setting it up from the source code which is available in the commcare-sync Github repository.
...
Download your DET config file from CommCare
Download or create a Data Export Toolconfig file.
The easiest way to create these is to start with a normal export configuration on HQ and have it generated. See https://dimagi.atlassian.net/wiki/x/JCrKfw for more details.
Edit the DET file using the “best practices” below
...
If you haven’t already, add the CommCare project space in the “CommCare Setup” tab.
If you haven’t already, add a CommCare account that has access to the project space.
Important note to Dimagi users: Do NOT use your superuser @dimagi.com account, follow the steps below to create a user below. Create a web user for a specific project, and set up API key for that user (under Account Settings). You can use a "+" in your email address that tells you what your web user is for. e.g. "firstnamelastname+demo-cc-sync@dimagi.com"
Add the export from the “Exports” tab.
On the export details page, click “run”.
When the run completes, view the logs to confirm it ran successfully.
...
System administration is documented in our production environment documentation.
CommCare Sync Data
View Exact Data Sent to the Device
You can use the same API URL which is used by the mobile devices to see what data will be sent to the phone or web application during a sync.
...
View Restore Data for Any Mobile User in HQ
...
View All Data Associated with a User:
...
.
...
App Specific:
...
http://www.commcarehq.org/a/{my-project-space}/phone/restore/{app_id}/?as={user}@{my-project-space}.commcarehq.org&version=2.0 (assumes current state of the app, not particular build)
...
Build Specific:
...
...
Additional Parameters
...
since={previous restore id}
...
Incremental response since the previous sync.
...
items=true
...
Include the item number in the response.
...
overwrite_cache=true
...
Don't return a cached value but rather recompute the response. Deletes the cache, so the next time you sync on the phone, it will use the newly computed result.
...
raw=true
...
Raw restore response without the UI.
...
device_id={device_id}
...
Fake a restore from a particular device id. WebApps uses a device ID of the form "WebAppsLogin".
...
app_id={app_id}
...
Restore using app aware sync. This will only sync down the reports for that particular application.
...
case_sync={clean_owners | livequery}
...
Select which case sync algorithm to use with this restore
...
hide_xml=true
...
Shows only aggregate case counts, without loading associated XML data
...
fail_hard=true
...