GeoNetwork – How to Upgrade from GeoNetwork Version 3 to Version 4

geonetwork

I was wondering if anyone has published a tutorial or walk-through on how to update Geonetwork opensource from version 3 (before the restructure to Elasticsearch) to version 4. Specifically I am trying to upgrade from 3.10.5 to 4.2.0 on Ubuntu 20.04. I am not looking for a tutorial for those specific versions, just something that is close.

I have an external data directory and use PostgreSQL as the database and tried the direct route of installing over the existing portal and it failed each time. That was not unexpected given the number of back-end changes. In addition, I am working with a non-connected virtual machine on my computer so I cannot set up a separate machine to harvest from the older portal, and I could not get two versions of Geonetwork to work on the same computer.

I also looked at the documentation, but the only thing I found was https://geonetwork-opensource.org/manuals/4.0.x/en/maintainer-guide/updating/index.html?highlight=upgrading which just covers the password issue. That said, my search abilities are not that great.

I have successfully created a 4.2.0 Geonetwork portal on another virtual machine and have been transferring metadata exports via Drive from the old portal to the new, but underestimated the amount of information included in the metadata exported from the 3.10 portal.

While the metadata imports fine,including resource specific links, I have found I now need to go through and reassign overview thumbnails and parent, child, and related resource links. Since I have almost 800 records to do this for, I am looking for something that will either speed things along, like copy a table from the original database that is not reliant on the old UUIDs (for some reason importing the metadata with the old UUIDs somehow had a lot of repeat value so had to have version 4 give everything new UUIDs) or rebuild everything if there is a step-by-step tutorial for upgrading two versions as different as mine.

I know this is a long shot as I should have been incrementally upgrading along the way, but thought I would check as I have almost a week's worth of work to set up all the overview thumbnails and resource linkages like they were in my initial portal.

Best Answer

For this, it turns out I needed to go slower. Setting up a generic install of 4.2.0 and then updating the following files with the appropriate information, reloading Geonetwork after the postgres.xml and web.xml updates: /WEB-INF/config-node/srv.xml /WEB-INF/config-db/jdbc.properties /WEB-INF/config-db/postgres.xml /WEB-INF/web.xml

Funny, I made the same changes earlier to the WAR itself and it would not start. I assume trying everything at once overwhelmed the process which gave a failed install.

I then shut down Tomcat and deleted both wro4j-cache files from my external data directory and started Tomcat again.

I then added the elasticsearch user to /WEB-INF/config-properties (did not need password as security is not enabled) and restarted Tomcat again.

Now Geonetwork 4.2.0 can see all my existing records, it just will not display them. That is a different issue, though, so I will ask about that later.

Related Question