dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #46427
Upgrading DHIS2 from 2.21 to 2.24 and using new exporter/importer
Hi Morten,
We have our metadata configured on a DHIS 2.21 instance. We have
sequentially upgraded this instance to 2.22, 2.23 and 2.24 by following the
upgrade notes for each of them.
We want to export the metadata from this upgraded 2.24 instance and import
it to a fresh instance which is already on 2.24. We followed the below
steps.
1) Export the metadata from the upgraded 2.24 instance using the new
exporter
*curl -H "Content-Type: application/json" -X GET -u username:password
http://xxxx:8080/api/24/metadata.json
<http://xxxx:8080/api/24/metadata.json> > metadata.224.newapi.json *
2) Import the metadata using the new importer to a fresh instance which is
already on 2.24
*curl -H "Content-Type: application/json" -X POST --data
@metadata.224.newapi.json -u username:password
http://yyyy:8080/api/24/metadata <http://yyyy:8080/api/24/metadata> >
output.txt*
We see that none of the objects are getting imported. The complete response
of the importer is attached below. Any thoughts please. Also let me know if
any further details are required from our end.
Thanks
Aamer.
{"status":"ERROR","stats":{"total":9,"created":0,"updated":0,"deleted":0,"ignored":9},"typeReports":[{"klass":"org.hisp.dhis.organisationunit.OrganisationUnitGroupSet","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.CategoryOptionGroupSet","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.DataElementCategory","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.organisationunit.OrganisationUnitGroup","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.common.filter.MetaDataFilter","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.report.Report","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dashboard.DashboardItem","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.user.UserAuthorityGroup","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"objectReports":[{"klass":"org.hisp.dhis.user.UserAuthorityGroup","index":7,"errorReports":[{"message":"Property `name`Â with value `Superuser` on object Superuser [nnNYZeZaox6] (UserAuthorityGroup)Â already exists on object yrB6vc5Ip3r.","mainKlass":"org.hisp.dhis.user.UserAuthorityGroup","errorCode":"E5003"}]}]},{"klass":"org.hisp.dhis.dataelement.DataElementCategoryCombo","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dashboard.Dashboard","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.reporttable.ReportTable","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.organisationunit.OrganisationUnit","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.DataElementCategoryOptionCombo","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.indicator.Indicator","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.user.User","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"objectReports":[{"klass":"org.hisp.dhis.user.User","index":735,"errorReports":[{"message":"Property `username`Â with value `admin` on object null null [JB4V8ZlRV7l] (UserCredentials)Â already exists on object KvMx6c1eoYo.","mainKlass":"org.hisp.dhis.user.UserCredentials","errorCode":"E5003"}]}]},{"klass":"org.hisp.dhis.indicator.IndicatorGroup","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.DataElementCategoryOption","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.chart.Chart","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.DataElement","stats":{"total":5,"created":0,"updated":0,"deleted":0,"ignored":5},"objectReports":[{"klass":"org.hisp.dhis.dataelement.DataElement","index":341,"errorReports":[{"message":"Property `shortName`Â with value `Diabetes` on object Diabetes (Chronic) [R3hAKZ7OZxC] (DataElement)Â already exists on object psMXtszCxj0.","mainKlass":"org.hisp.dhis.dataelement.DataElement","errorCode":"E5003"}]},{"klass":"org.hisp.dhis.dataelement.DataElement","index":88,"errorReports":[{"message":"Property `shortName`Â with value `Beneficiaries MHPS Individual: Psychological suppo` on object Beneficiaries MHPS Individual: Psychological support - F/up visit [d2wj03D4iY1] (DataElement)Â already exists on object A5zai5oIfwW.","mainKlass":"org.hisp.dhis.dataelement.DataElement","errorCode":"E5003"}]},{"klass":"org.hisp.dhis.dataelement.DataElement","index":1115,"errorReports":[{"message":"Property `shortName`Â with value `Separation/Loss as precipitating event: Family mem` on object Separation/Loss as precipitating event: Family member(s) killed / missing [EKZGmJGDnL8] (DataElement)Â already exists on object YzBkwx75Js0.","mainKlass":"org.hisp.dhis.dataelement.DataElement","errorCode":"E5003"}]},{"klass":"org.hisp.dhis.dataelement.DataElement","index":76,"errorReports":[{"message":"Property `shortName`Â with value `Beneficiaries MHPS Family: Psychological support -` on object Beneficiaries MHPS Family: Psychological support - F/up visit [Ewz74BH3ZTI] (DataElement)Â already exists on object hiFYk97u4qp.","mainKlass":"org.hisp.dhis.dataelement.DataElement","errorCode":"E5003"}]},{"klass":"org.hisp.dhis.dataelement.DataElement","index":959,"errorReports":[{"message":"Property `shortName`Â with value `Other diagnosis` on object Other diagnosis [ajOJjk4sO29] (DataElement)Â already exists on object WrYk9kLLYzt.","mainKlass":"org.hisp.dhis.dataelement.DataElement","errorCode":"E5003"}]}]},{"klass":"org.hisp.dhis.document.Document","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.translation.Translation","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataset.DataSet","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.CategoryOptionGroup","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataelement.DataElementGroup","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"objectReports":[{"klass":"org.hisp.dhis.dataelement.DataElementGroup","index":204,"errorReports":[{"message":"Property `shortName`Â with value `TB Program - Treatment Results - TB Pulmonary wit` on object TB Program - Treatment Results - TB Pulmonary with Positive bacteriological status outcomes [jFFimTSIhU0] (DataElementGroup)Â already exists on object jSsleWpQhSQ.","mainKlass":"org.hisp.dhis.dataelement.DataElementGroup","errorCode":"E5003"}]}]},{"klass":"org.hisp.dhis.user.UserGroup","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.organisationunit.OrganisationUnitLevel","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.dataset.Section","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}},{"klass":"org.hisp.dhis.trackedentity.TrackedEntity","stats":{"total":1,"created":0,"updated":0,"deleted":0,"ignored":1},"objectReports":[{"klass":"org.hisp.dhis.trackedentity.TrackedEntity","index":0,"errorReports":[{"message":"Property `name`Â with value `Person` on object Person [wRmh0yhBJI5] (TrackedEntity)Â already exists on object MCPQUTHX1Ze.","mainKlass":"org.hisp.dhis.trackedentity.TrackedEntity","errorCode":"E5003"}]}]},{"klass":"org.hisp.dhis.indicator.IndicatorType","stats":{"total":0,"created":0,"updated":0,"deleted":0,"ignored":0}}]}
Follow ups