← Back to team overview

dhis2-devs team mailing list archive

Re: Upgrading DHIS2 from 2.21 to 2.24 and using new exporter/importer

 

Hi Aamer

Probably what is happening is that the new database has some constraints
that the old one doesn't. We have had some issues with hibernate in the
past, and for certain databases that means that many of the constraints was
not applied..

If you look at the messages, you will see that e.g `shortName` must be
unique for data elements.. the list of errors is not big though, probably
you can go through the payload and manually update the objects which has
issues?

Another issue I see is that you are importing users, and those UIDs was
only stabilized in 2.23.. so you might want to also manually update those
(again, should not be a big job), this is not done as a startup routine..
just done when creating the admin user etc in a fresh database

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Tue, Aug 23, 2016 at 12:00 PM, Aamer Mohammed <aamerm@xxxxxxxxxxxxxxxx>
wrote:

> Any thoughts please on the below approach. Let us know if any details are
> required from our end around this.
>
> On Wed, Aug 17, 2016 at 1:18 PM, Aamer Mohammed <aamerm@xxxxxxxxxxxxxxxx>
> wrote:
>
>> 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.
>>
>
>

Follow ups

References