[Geoserver-users] GeoServer - Merge Two Data Directories

I have GeoServer 2.3.4 on Machine 1 with Data Directory A and Workspace X.

I have GeoServer 2.3.4 on Machine 2 with Data Directory B and Workspace Y.

How can I create GeoServer 2.3.4 on Machine 1 with Data Directory A with
Workspace X and Workspace Y?

Can I just copy Workspace Y into Data Directory A and start GeoServer up?
--Matt

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Merge-Two-Data-Directories-tp5104936.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Matt,

···

2014-02-20 17:21 GMT+01:00 maw269 <maw269@anonymised.com>:

I have GeoServer 2.3.4 on Machine 1 with Data Directory A and Workspace X.

I have GeoServer 2.3.4 on Machine 2 with Data Directory B and Workspace Y.

How can I create GeoServer 2.3.4 on Machine 1 with Data Directory A with
Workspace X and Workspace Y?

Can I just copy Workspace Y into Data Directory A and start GeoServer up?
–Matt

In theory, yes, it could work, unless you have id conflicts on some objects.
Also, be sure that no object in X or Y refers to global objects, such as styles.
If both workspace don’t depend to any global object you should have no problem.

Mauro

Many Thanks Mauro, makes sense. That leads me to the question, is there a way
to create objects like Styles, that are localized to the workspace?
--Matt

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Merge-Two-Data-Directories-tp5104936p5104947.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Matt,

···

2014-02-20 17:55 GMT+01:00 maw269 <maw269@anonymised.com>:

Many Thanks Mauro, makes sense. That leads me to the question, is there a way
to create objects like Styles, that are localized to the workspace?
–Matt

Yes, sure, in the styles configuration page you have a combo where you can choose the workspace.
Pay attention that, when a style is bound to a workspace it can only be used to style layers of that workspace and is not available globally anymore.

Mauro

Now that I have my STYLES within my workspace, when I tried to access them
via:

https://myserver/geoserver/wms?LAYERS=myLayer&STYLES=myStyle&ETC

I get an error saying the 'myStyle' was not found.

Copying the way the GeoServer Layer Preview does it, I added the workspace
to the base url like such:

https://myserver/geoserver/*&lt;myWorkspace&gt;\*/wms?LAYERS=myLayer&amp;STYLES=myStyle&amp;ETC\.\.\.
and this works fine.

Why do I have to do that? Is the reason explained within the WMS standard or
GeoServer manual?

Many Thanks,
Matt

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Merge-Two-Data-Directories-tp5104936p5105185.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Matt,

···

2014-02-21 21:27 GMT+01:00 maw269 <maw269@anonymised.com>:

Now that I have my STYLES within my workspace, when I tried to access them
via:

https://myserver/geoserver/wms?LAYERS=myLayer&STYLES=myStyle&ETC.

I get an error saying the ‘myStyle’ was not found.

Copying the way the GeoServer Layer Preview does it, I added the workspace
to the base url like such:

https://myserver/geoserver/**/wms?LAYERS=myLayer&STYLES=myStyle&ETC…
and this works fine.

Why do I have to do that? Is the reason explained within the WMS standard or
GeoServer manual?

Unfortunately at the moment styles defined inside a workspace can only be used when you specify the workspace on the request (this happens also for layergroups, but not for layers).
This is considered a limit/issue of the current implementation.
The community is discussing on how to solve this. Please, have a look at this thread: http://osgeo-org.1560.x6.nabble.com/changing-fixing-behaviour-of-local-styles-and-layer-groups-td5101965.html

Cheers,
Mauro

This is exactly what I was looking for. Many thanks!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Merge-Two-Data-Directories-tp5104936p5105280.html
Sent from the GeoServer - User mailing list archive at Nabble.com.