I have copied workspaces and styles from data_dir folder of one GeoServer to another in order to migrate data. Then restarted GeoServer and workspaces and styles appeared in the new server. But no Stores and Layers.

I have found in similar question that there is a trick needs to be done with datastore.xml file to make Stores and Layers also migrated.

How to migrate a specific workspace, store and layer in Geoserver

enter image description here

I have deleted all content from this tag and this made a trick. Store and Published layers have appeared.

Is it secure to delete this tag? What does it mean when I delete it?

enter image description here

  • You need to copy the whole data directory not bits of it.
    – Ian Turton
    Apr 10, 2023 at 17:48
  • Yeah, I know. But unfortunately, I have data from three geoservers, that I need to migrate into one. Therefore, I can use just one data_dir folder and restore data partially from other two... what to do in this case? Apr 10, 2023 at 18:26
  • and we told you it can't be done that way, unless the workspace is isolated. The password is not relevant to your issue (that was for 2.7.x to 2.9.x).
    – Ian Turton
    Apr 11, 2023 at 10:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.