Export layer configurations from a geoserver

Can I export layer configurations from a geoserver and import them into a geoserver on another computer? It takes a lot of time to maintain layer configuration every time you switch computers.

+3
source share
4 answers

Apparently you cannot ... The only way is to copy the data_dir directory and replace the new data_dir settings. Then, when you start the geoserver, the layer settings are automatically configured.

+6
source

You can use the Geoserver 1 dispatcher (wrapper around geoserver rest-api) to customize your layers and save the procedure. Then you can simply point the Manager to the new Geoserver.

+2

Geoserver 2.x Geoserver 2.y( Tomcat):

  • Geoserver 2.x.

  • Geoserver 2.x Tomcat, Tomcat ( sudo/etc/init.d/tomcatx).

  • ( ) "geoserver" "webapps". ( tomcatx/webapps).

  • Geoserver ( Geoserver 2.y). Tomcat, .

  • "web.xml" (tomcatx/webapps/geoserver/WEB-INF/web.xml) . :

    <context-param>
        <param-name>GEOSERVER_DATA_DIR</param-name>
        <param-value>/var/lib/tomcatx/webapps/geoserver/data</param-value>
    </context-param> 
    

    <context-param>
        <param-name>GEOSERVER_DATA_DIR</param-name>
        <param-value>new-path-of-data</param-value>
    </context-param> 
  1. "" ( tomcatx/webapps/geoserver/data/security).

  2. tomcatx. (chgrp, chown)

  3. Tomcat.

.

Geoserver 2.x - .

Geoserver 2.y - .

tomcatx - Tomcat.

+1
1.copy folder "data" in geoserver to on another computer and replace it to .war and geoserver folder

2-dump database old to new computer 

3-restart tomcat

/etc/init.d/tomacat7 rebat

4-change owner "data" on geoserver to  tomcat user 

-cd to / var / lib / tomcat7 / webapps / geoserver sudo chown -R tomcat7 data sudo chown -R: data tomcat7

5-reload store on geoserver
0
source

All Articles