[GeoNode-users] migrate geonode 2.4 to another server
Alessandro Burastero
alessandro at acrotec.it
Tue Apr 7 05:25:05 PDT 2015
Thanks Simone... now i can install the b24 release
...but i confirm that the command geonode-updateid doesn't update the
base_link table... here is the steps made to migrate the datas
- install geonode
- run geonode createsuperuser
- run geonode-updateip
- copy (and replace) from old server:
- /usr/share/geoserver/data/data/geonode
- /usr/share/geoserver/data/workspaces
- /usr/share/geoserver/data/styles
- /var/www/geonode/uploaded/thumbs
- backup the old geonode store db and restore it in the new server
- modify the connection settings in the geoserver datastore (change the
password)
now i have all the layers defined correctly in the geoserver and also in
geonode... but all the links (also the WMS) pointing to the old
geoserver, even if i run a geonode-updateip.
the only way to se the link to the new geoserver is to manually update
the base_link table as Paolo sudjest (update base_link set url =
replace(url, 'old_ip', 'new_ip') ).
Alessandro
On 07/04/15 11:33, Simone Dalmasso wrote:
> Alessandro I just released the b24 which fixes the error. I apologize
> for it :)
>
> 2015-04-07 10:34 GMT+02:00 Alessandro Burastero <alessandro at acrotec.it
> <mailto:alessandro at acrotec.it>>:
>
> mmm i tried the geonode-updateip but i didn't worked... maybe i
> made something wrong...
> ...now i'm testing again the procedure, but i can't install the
> new geonode beta 23 in a new ubuntu 14-04 intallation... the
> following error appear during the geonode postinstall step:
>
> Running GeoNode postinstall ...
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named geonode
> Traceback (most recent call last):
> File "/usr/bin/django-admin", line 5, in <module>
> management.execute_from_command_line()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 399, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 261, in fetch_command
> commands = get_commands()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 107, in get_commands
> apps = settings.INSTALLED_APPS
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 54, in __getattr__
> self._setup(name)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 49, in _setup
> self._wrapped = Settings(settings_module)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 132, in __init__
> % (self.SETTINGS_MODULE, e)
> ImportError: Could not import settings 'geonode.settings' (Is it
> on sys.path? Is there an import error in the settings file?): No
> module named geonode.settings
> Traceback (most recent call last):
> File "/usr/bin/django-admin", line 5, in <module>
> management.execute_from_command_line()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 399, in execute_from_command_line
> utility.execute()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 261, in fetch_command
> commands = get_commands()
> File
> "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 107, in get_commands
> apps = settings.INSTALLED_APPS
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 54, in __getattr__
> self._setup(name)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 49, in _setup
> self._wrapped = Settings(settings_module)
> File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 132, in __init__
> % (self.SETTINGS_MODULE, e)
> ImportError: Could not import settings 'geonode.settings' (Is it
> on sys.path? Is there an import error in the settings file?): No
> module named geonode.settings
>
>
>
> ...while the update from the beta22 goes well
>
> thanks again
>
> Alessandro
>
> On 07/04/15 10:11, Paolo Corti wrote:
>
> Uh forget my comment about documentation, I have just realized
> that
> geonode-updateip is a bash script and not a django command.
> cheers
> p
>
> On Tue, Apr 7, 2015 at 10:04 AM, Paolo Corti <pcorti at gmail.com
> <mailto:pcorti at gmail.com>> wrote:
>
> Definitely that is the best way, totally forgot about that
> command :)
> we need to add it to the documentation
> (http://docs.geonode.org/en/master/tutorials/admin/commands.html#commands)
> by the way
> cheers
> p
>
> On Fri, Apr 3, 2015 at 5:38 PM, Simone Dalmasso
> <simone.dalmasso at gmail.com
> <mailto:simone.dalmasso at gmail.com>> wrote:
>
> Shouldn't the geonode-updateip command do this?
>
> 2015-03-31 13:54 GMT+02:00 Paolo Corti
> <pcorti at gmail.com <mailto:pcorti at gmail.com>>:
>
> It looks to me to be a bug, could you file a ticket?
> Thanks
>
> Meanwhile what you can do is to manually update
> the base_links table
> with something like (not tested):
>
> update base_link
> set url = replace(url, 'old_ip', 'new_ip')
>
> p
>
> On Tue, Mar 31, 2015 at 1:16 PM, Alessandro Burastero
> <alessandro at acrotec.it
> <mailto:alessandro at acrotec.it>> wrote:
>
> i've truncated the base_link table and then
> i've run the geonode
> updatelayers command (and also
> updatelayerid)... but the base_link table
> remains empty
>
> Alessandro
>
>
> On 31/03/15 11:39, Paolo Corti wrote:
>
> I have no way to test this right now but I
> believe that truncating the
> base_links table and running the
> updatelayers command should fix this.
> Before doing this action do a backup and
> try it on just one layer
> (removing the links related to only that
> layer from the base_links
> table)
> You may also need to run the
> updatemaplayerip command.
> p
>
> On Tue, Mar 31, 2015 at 11:08 AM,
> Alessandro Burastero
> <alessandro at acrotec.it
> <mailto:alessandro at acrotec.it>> wrote:
>
> Hi guys
> i need to migrate my geonode 2.4b22 to
> another server (same os: ubuntu
> 14-04
> and same geonode version)...
>
> I tried doing it in this way:
> - copy the geoserver data, styles
> and workspace directory in the new
> server
> - domp via pg_dump and restore via
> psql the geonode database
>
> the result is that geonode recognize
> all layers but it cannot view
> them
> because all links in the layer
> metadata contains the old server
> address...
>
> haw can i solve it?
>
> thanks in advance
> Alessandro
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> <mailto:geonode-users at lists.osgeo.org>
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>
>
>
>
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> <mailto:geonode-users at lists.osgeo.org>
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>
>
>
>
> --
> Simone
>
>
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
>
>
>
>
>
>
>
> --
> Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150407/598e4bca/attachment.html>
More information about the geonode-users
mailing list