<div dir="ltr"><div><div><div>Hi Paolo,<br><br></div><div>Firstly, I should have ran the python scripts individually within migrate2.sh, I noticed some errors as follows:<br></div><div><br></div> 'create_auth_group_and_update_res.py', reveals error:<br><br>Traceback (most recent call last):<br> File "create_auth_group_and_update_res.py", line 10, in <module><br> from geonode.groups.models import GroupProfile<br> File "/usr/local/lib/python2.7/dist-packages/geonode/groups/models.py", line 5, in <module><br> from django.contrib.auth.models import Group<br> File "/usr/lib/python2.7/dist-packages/django/contrib/auth/__init__.py", line 6, in <module><br> from django.middleware.csrf import rotate_token<br> File "/usr/lib/python2.7/dist-packages/django/middleware/csrf.py", line 14, in <module><br> from django.utils.cache import patch_vary_headers<br> File "/usr/lib/python2.7/dist-packages/django/utils/cache.py", line 26, in <module><br> from django.core.cache import get_cache<br> File "/usr/lib/python2.7/dist-packages/django/core/cache/__init__.py", line 69, in <module><br> if DEFAULT_CACHE_ALIAS not in settings.CACHES:<br> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__<br> self._setup(name)<br> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup<br> self._wrapped = Settings(settings_module)<br> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__<br> % (self.SETTINGS_MODULE, e)<br>ImportError: Could not import settings '/etc/genode/local_settings.py' (Is it on sys.path? Is there an import error in the settings file?): Import by filename is not supported.<br><br></div><b>The second script, 'migrate_tags.py', ran errors for the first part relative to psycopg2.IntegrityError on my layers, eg:</b><br><br>('Municipality', 'municipality')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Island) already exists.<br><br>('Island', 'island')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Atoll) already exists.<br><br>('Atoll', 'atoll')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(nr) already exists.<br><br>('nr', 'nr')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(District) already exists.<br><br>('District', 'district')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Village) already exists.<br><br>('Village', 'village')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Local Level Government) already exists.<br><br>('Local Level Government', 'local-level-government')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Building Replacement Cost) already exists.<br><br>('Building Replacement Cost', 'building-replacement-cost')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(State) already exists.<br><br>('State', 'state')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Ward) already exists.<br><br>('Ward', 'ward')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Sub District) already exists.<br><br>('Sub District', 'sub-district')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Area Council) already exists.<br><br>('Area Council', 'area-council')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(hazards) already exists.<br><br>('hazards', 'hazards')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Building Exposure Aggregates) already exists.<br><br>('Building Exposure Aggregates', 'building-exposure-aggregates')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(nrj) already exists.<br><br>('nrj', 'nrj')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Land cover) already exists.<br><br>('Land cover', 'land-cover')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Land use) already exists.<br><br>('Land use', 'land-use')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Land Cover) already exists.<br><br>('Land Cover', 'land-cover_1')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Land Use) already exists.<br><br>('Land Use', 'land-use_1')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss For TC & EQ) already exists.<br><br>('Average Annual Loss For TC & EQ', 'average-annual-loss-for-tc-eq')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss) already exists.<br><br>('Average Annual Loss', 'average-annual-loss')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Building Replacement Costs) already exists.<br><br>('Building Replacement Costs', 'building-replacement-costs')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Exposure Cash Crops) already exists.<br><br>('Exposure Cash Crops', 'exposure-cash-crops')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(imagery) already exists.<br><br>('imagery', 'imagery')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(REQUIRED: Common-use word or phrase used to describe the subject of the data set.) already exists.<br><br>('REQUIRED: Common-use word or phrase used to describe the subject of the data set.', 'required-common-use-word-or-phrase-used-to-describe-the-subject-of-the-data-set')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss TC & EQ) already exists.<br><br>('Average Annual Loss TC & EQ', 'average-annual-loss-tc-eq')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss for TC & EQ) already exists.<br><br>('Average Annual Loss for TC & EQ', 'average-annual-loss-for-tc-eq_1')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Population) already exists.<br><br>('Population', 'population')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss tc and eq) already exists.<br><br>('Average Annual Loss tc and eq', 'average-annual-loss-tc-and-eq')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Average Annual Loss for Tropical Cyclone and Earthquake) already exists.<br><br>('Average Annual Loss for Tropical Cyclone and Earthquake', 'average-annual-loss-for-tropical-cyclone-and-earthquake')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Probabilistic) already exists.<br><br>('Probabilistic', 'probabilistic')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Earthquake) already exists.<br><br>('Earthquake', 'earthquake')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Hazard) already exists.<br><br>('Hazard', 'hazard')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(cyclone) already exists.<br><br>('cyclone', 'cyclone')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(solomons) already exists.<br><br>('solomons', 'solomons')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(risk) already exists.<br><br>('risk', 'risk')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Summary Report) already exists.<br><br>('Summary Report', 'summary-report')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Risk Assessment) already exists.<br><br>('Risk Assessment', 'risk-assessment')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Loss) already exists.<br><br>('Loss', 'loss')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Topography) already exists.<br><br>('Topography', 'topography')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Document) already exists.<br><br>('Document', 'document')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Imagery) already exists.<br><br>('Imagery', 'imagery_1')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(Soil) already exists.<br><br>('Soil', 'soil')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(SOILS) already exists.<br><br>('SOILS', 'soils')<br><class 'psycopg2.IntegrityError'><br>duplicate key value violates unique constraint "taggit_tag_name_key"<br>DETAIL: Key (name)=(SOIL) already exists.<br><br></div><b>And the last python script, 'migrate_group_permissions.py', revealed:</b><br><br>Traceback (most recent call last):<br> File "migrate_group_permissions.py", line 16, in <module><br> authenticated_group_id = dst_cur.next()[0]<br>StopIteration<br><br><div><br></div><div>Correct me if I'm wrong, it looks like the error in the first script is related to my settings_path within gn_migration.cfg file. I saw within the forums that this should be set to 'settings_path = geonode.settings'. <br><br>As for errors in scripts <b>migrate_tags.py and </b><b>migrate_group_permissions.py, </b>I'm hoping to get your advice on this part.<br><br></div><div>Thank you immensely,<br><br></div><div>Mana<br></div><div><br><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 5:09 AM, Paolo Corti <span dir="ltr"><<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mana<br>
did you run migrate2.sh after migrating the GeoServer data directory?<br>
did you see any error running that script?<br>
p<br>
<div><div class="h5"><br>
On Tue, Feb 9, 2016 at 2:00 AM, Mana Etches <<a href="mailto:manadotcom@gmail.com">manadotcom@gmail.com</a>> wrote:<br>
> Hello geonode gurus,<br>
><br>
> I've installed geonode 2.4 following instructions at<br>
> <a href="http://geonode.org/blog/2015/11/19/geonode-2.4-released/" rel="noreferrer" target="_blank">http://geonode.org/blog/2015/11/19/geonode-2.4-released/</a><br>
><br>
> I've followed Capooti's migration steps at guidelines at<br>
> <a href="https://github.com/capooti/geonode/blob/migration_from20_to_24/scripts/migrations/migrate20to24/index.rst" rel="noreferrer" target="_blank">https://github.com/capooti/geonode/blob/migration_from20_to_24/scripts/migrations/migrate20to24/index.rst</a><br>
><br>
> I'm at a point where I can see the number of layers, maps and users on<br>
> geonode GUI (but only as a registered user). I can log into geoserver admin,<br>
> however I don't see my layers, stores, on the admin panel.<br>
><br>
> I uploaded 2.0 GS data directory to geoserver 2.4 data directory as follows:<br>
> data/default to data/default<br>
> gwc-layers to gwc/layers<br>
> workspaces/geonode to workspaces/geonode/datastore<br>
><br>
> Note, I can upload layers just fine but I can only see the the layers that I<br>
> uploaded in the geonode_data in postgres. I can't see the layers from 2.0<br>
> database.<br>
><br>
> Lastly I ran a 'geonode updatelayers' and got the following results:<br>
><br>
> Finished processing 4 layers in 2.0 seconds.<br>
><br>
> 0 Created layers<br>
> 4 Updated layers<br>
> 0 Failed layers<br>
> 0.500000 seconds per layer<br>
><br>
> Updating only the layers that I uploaded.<br>
><br>
><br>
><br>
> For referencing purposes see my 'gn_migration.cfg' configurations below:<br>
><br>
> [db20]<br>
> dbname = old_db<br>
> host = 192.168.137.12<br>
> user = geonode<br>
> password = secret (replaced)<br>
><br>
> [db24]<br>
> dbname = geonode<br>
> host = 192.168.137.12<br>
> user = geonode<br>
> password = secret (replaced)<br>
><br>
> [path]<br>
> geonode_path = /usr/local/lib/python2.7/dist-packages/geonode<br>
> settings_path = /etc/genode/local_settings.py<br>
><br>
> My gut feeling is its a configuration issue.<br>
><br>
> Any help or point in the right direction would be very much appreciated<br>
><br>
> Mana<br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> geonode-users mailing list<br>
> <a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Paolo Corti<br>
Geospatial software developer<br>
web: <a href="http://www.paolocorti.net" rel="noreferrer" target="_blank">http://www.paolocorti.net</a><br>
twitter: @capooti<br>
skype: capooti<br>
</font></span></blockquote></div><br></div>