How to transfer Tracker Entity Program from one dhis Server Instance to Another Server Instance

Hello, community.

We had been setting up test configurations. Utilizing the test server, we produced a TRACKER ENTITY PROGRAM. and we wish to transfer that particular TRACKER PROGRAM to the server hosting the production server. The program has several stages that are related to the organization level and user roles.

If you’ve done this previously, kindly offer your suggestions to me.

Hi @Meky

Basically question is you should collect all DEs/TEAs/optionSets/atrributes etc in one json file by identifying the program UID.
There are few API points where you can get them:
/api/relationships - if you have relationship programs
/api/relationshipTypes
/api/optionSets
/api/optionGroupSets
/api/programs
/api/programStageSections
/api/attributes
/api/programRules
/api/programRuleActions
/api/programRuleVariables
/api/dataElements
/api/trackedEntityTypes
/api/programStages
/api/options
/api/optionGroups
/api/organisationUnits
/api/trackedEntityAttributes
/api/organisationUnitGroups
/api/organisationUnitLevels
/api/programDataElements
/api/users
/api/userRoles
/api/userGroups
/api/programSections
/api/organisationUnitGroupSets
/api/validationNotificationTemplates

After collecting all this metadata you can export to the new server

Good luck.
Regards,
Ulanbek

1 Like

Thank you so much for your response, @Ulanbek .

But I am getting confused on how and where we can collect the DEs/TEAs etc. Is it on the Data import and export app? Please, it would be nice if you could clearly share the steps.

Best Regards
Meky

Hi
You could use Import/export > Metadata Dependency export > Programs> select your program name > export as JSON then

Metadata Import JSON and dry run on your live server.

4 Likes

Thank you, @raju. Let me try it. I will come up with some feedback.

1 Like

Although it needs some debugging, I was able to export that particular program’s metadata dependency and import the program’s specific metadata dependencies to another instance. I did this after performing a dry run and noticing the errors. Some import collisions were skipped, and others were merged.

1 Like