[GeoNetwork-users] 2.6.4 to 2.10.2 Postgresql migration scripts fail and MEF means quite a lot of manual intervention afterwards?

Hi there.

We have a GN 2.6.4 running with a db in PostgreSQL 9.1.4 (with the PostGIS
addon, though the db connection defined in config.xml is of PostgreSQL sort,
i.e no spatial index), and we'd like to update it to 2.10(.2). GN is running
in a Tomcat.

/Method A/ is exporting metadata from 2.6.4 via *GAST*, running 2.10.2 and
let it initialize a new db, then batch import the metadata records with the
web ui. That works, but althogh the MEF format does appear to store info
about cats and groups for each post, the categories and groups and users etc
are not stored, and anyways when doing batch import you select one group and
one category for all the MEFs being imported? Which would mean setting them
manually for each post afterwards I guess?
-----
So we looked into /Method B/, which is running 2.10.2, configure it to
connect to the existing db, but first running the migrate scripts in
/classes/setup/sql/migrate. (If the scripts aren't run manually they will be
run automatically upon first launch of GN, however something goes amiss and
the number of tables are not updated to the 34 that 2.10.2 will create in an
empty db, two or three are missing. The error when GN is started is "Raised
exception while starting appl handler. Skipped.").

When running the scripts manually (from /sql/migrate/v265/ to /v210,
migrate-db-postgresql.sql when available and always migrate-default.sql) the
v280 and v210 migrate-default.sql fail (the others do not).

V280 migrate-default.sql fails with "ERROR: duplicate key value violates
unique constraint "categories_pkey"
DETAIL: Key (id)=(11) already exists." and that's because a user-defined
cat resides there. Removing 11, 12 and 13 involved removing records from
categoriesdes and metadatacateg. That might be explainable, but next INSERT
INTO Settings VALUES (722,720,'enableSearchPanel','false'); is attempted,
and this fails because Key (id)=(722) already exists, and the row is:
722;2;"node";"csw", and not easily removed since "722" is used as a parent
id in the same table in multiple locations.

Further, the tables "requests" and "params" are in the create-db-postgresql
script, but they are not in any migrate script.

Does anyone have any helpful hints?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/2-6-4-to-2-10-2-Postgresql-migration-scripts-fail-and-MEF-means-quite-a-lot-of-manual-intervention-a-tp5085782.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

2013/10/25 David I <perssond9@anonymised.com>:

Hi there.

We have a GN 2.6.4 running with a db in PostgreSQL 9.1.4 (with the PostGIS
addon, though the db connection defined in config.xml is of PostgreSQL sort,
i.e no spatial index), and we'd like to update it to 2.10(.2). GN is running
in a Tomcat.

[SNIP]

Does anyone have any helpful hints?

No, but we will try a similar update in the near future (same GN
versions) and I will appreciate any feedback on this direction.

Regards,

César

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   César Martínez Izquierdo
   GIS developer
   - - - - - - - - - - - - - - - - - - - -
   Blog: http://geotechnotes.wordpress.com/
   ETC-SIA: http://sia.eionet.europa.eu/
   Universitat Autònoma de Barcelona (SPAIN)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Hi,

Likewise it would be interesting to see what your experiences are. We could
not overcome our issues with the db update scripts so we created and
initialized a new DB to go with the new version (application). Before that
we exported all metadata as a zip (multi-mef) in the old application. In the
new application we manually recreated the old groups and
categories(regarding the the xml services - the new security system is worth
a thread on its own) then we imported the zip (not batch, must use "insert
metadata"); the metadata posts then retain their associated groups and
categories.

Good luck.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/2-6-4-to-2-10-2-Postgresql-migration-scripts-fail-and-MEF-means-quite-a-lot-of-manual-intervention-a-tp5085782p5088731.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi,

I had quite similar issues a while ago, trying to upgrade a GN 2.7 (SVN
trunk, frozen at some point) to 2.10.
I had to perform the SQL updates step by step, comparing my DB with a fresh
new 2.10 DB, checking what will work or not. I've got the expurgated
script, but I guess it won't help you, since you're starting with a clean
2.6.4
One hint though : when you set up some harvesting, for example, it is
stored in the settings table, using some available IDs. Unfortunately, this
can occupy IDs that were eventually used for additionnal settings in newer
versions.This can explain your *INSERT INTO Settings VALUES
(722,720,'enableSearchPanel','**false');* problem : a insert command
colliding with harvesting settings.
Maybe you can try removing all harvesting (that is quite easy to restore
afterwards, if you write down your harvesting parameters), and may fix the
issue...
Hope it will help...
Cheers,

Jean

2013/11/12 David I <perssond9@anonymised.com>

Hi,

Likewise it would be interesting to see what your experiences are. We could
not overcome our issues with the db update scripts so we created and
initialized a new DB to go with the new version (application). Before that
we exported all metadata as a zip (multi-mef) in the old application. In
the
new application we manually recreated the old groups and
categories(regarding the the xml services - the new security system is
worth
a thread on its own) then we imported the zip (not batch, must use "insert
metadata"); the metadata posts then retain their associated groups and
categories.

Good luck.

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/2-6-4-to-2-10-2-Postgresql-migration-scripts-fail-and-MEF-means-quite-a-lot-of-manual-intervention-a-tp5085782p5088731.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models.
Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and
register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork