[GeoNode-users] migration suggestions

Toni Schönbuchner toni.schoenbuchner at csgis.de
Thu Mar 19 12:37:23 PDT 2020

Dear Eugenio,

> 	• I set the wgsi module in apache2. The geonode is served now with the 'allowed_hosts' error. I think the issue could be related to the settings. In the 2.4 version I remember I set SITE_URL, should I set something similar even in this version?

Allowed hosts is a security mechanism by Django  to define Domains that serve your instance.

To overcome an 504 error you can add something like

ALLOWED_HOSTS = ['localhost' '' 'your domain.com']

to your settings.py or local_settings.p However, we all more and more avoid touching the settings file and try to configure everything
with environment variables. So with a manual setup you can try to add it to your uwsgi config:

> 	• I created a geonode postgresql empty db, while I restored the backup from that I was using in 2.4 version. How I should populate with the new data-schema the geonode metadata db? I remember there was the command python manage.py --syncdb, does still exist? I tried but I got error.

I'm unsure If I correctly understand. But the rough flow looks like:

	• Export your geonode 2.4 Database
	• Import it to a fresh Database
	• Be sure to correctly set permissions for your User
	• Change your settings.py for using the new database and in case the correct user
	• Fix some inconsistency within your new database. Run f.e. with pgadmin or by psql from console
		• ALTER TABLE public.layers_layer DROP COLUMN service_id
	• Run the migrations, this should update your database scheme from 2.4 to 2.10
		• DJANGO_SETTINGS_MODULE=YOURGEONODE.local_settings django python manage.py migrate --fake-initial

You will need to change those commands to fit your setup further run into errors here and
there but hopefully this steps help you to find out of the forest.




Spinnereistraße 7
Halle 18 04179 Leipzig
Web		https://csgis.de

Hinweis gemäß § 33 BDSG
Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den 
Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich 
erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht 
von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung, 
Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.

More information about the geonode-users mailing list