|
From: Philippe C. <Phi...@av...> - 2015-12-07 16:52:15
|
BINGO ! Thank to all of you
In order to help others, here are the needed steps to move a 2.10.2
geonetwork installation to 3.0.2
in this specific context:
Existing installation: GN 2.10.2, postgresql
database, custom datadir (elsewhere than the default datadir)
The aim: a 3.0.2 GN version running in a tomcat
servlet, on a new debian server.
Save the database !
Deploy the new war file
If you want to use a custom datadir, you have to follow this
documentation
<http://geonetwork-opensource.org/manuals/2.10.4/eng/users/admin/advanced-configuration/index.html#geonetwork-data-directory>
Start the tomcat
Wait until GN is fully started (check the web page) and stop the tomcat
Edit configuration files (.../WEB-INF/config-node/srv.xml and
.../WEB-INF/config-db/jdbc.properties) in order to point to your
postgres database server, username, passwd ...
Copy the existing custom datadir and delete index, indexspatial,
data/subversion, config/schema_plugins folders
Fill the custom datadir/config/schema_plugins with an existing Gn 3.0.2
installation, or get the scheme from github
Start the tomcat
In the log file (catalina.out), you should see errors about the primary
key on services tables and about a foreign key on serviceparameters table.
Stop the tomcat
Run the following sql commands with a client like pgadmin:
* alter table services add constraint services_pkey primary key (id);
* alter table ServiceParameters add constraint
FK_t32t4xtdqmjhl8xmjpe95e474 foreign key (service) references Services;
Restart GN
If you get trouble with the overviews (no display), this may be due to
server URL changes. Check in the log file, looking for error messages
about the previous URL. Then, you can use the URL replacer in the admin
console/tools/batch process to change URL for a set (or all) of metadata
you've previously selected. After all, you'll have to rebuild the index.
Hope this may help
|