When the development environment changes, or the development completes the project site implementation, the Operation dimension, often will face the data and the service migration, this includes the spatial data as well as the GeoServer service migration work.
Here is a reminder: If you are using a similar open source Webgis technology solution, it is recommended that the software environment be consistent before and after the migration to avoid some unexpected problems.
Spatial data (PostGIS) migration
The PgAdmin3 tool for data backup and recovery is borrowed from PostgreSQL.
Data backup
Data recovery
Data recovery needs to operate against an existing database, so there is no target database in the PostgreSQL that needs to be migrated, and a new empty database needs to be created before the restore operation
Attached: This is the simplest backup and recovery method for PostgreSQL. For the backup and recovery of PostgreSQL, there are many high-level topic content, this article is not covered, please refer to the official documents for details.
GeoServer Service Migration
In our open source Webgis technology Roadmap, GeoServer is used only to provide some conventional WMS and WFS services, and for the time being there is no deeper application involved, so the migration of geoserver services is relatively straightforward.
GeoServer is a workspace for data organization and layer publishing, workspaces-data storage-layers (layer groups) This level of relationship is directly reflected in its configuration file.
All the workspace information profiles are stored in the. \geoserver 2.7.6\data_dir\workspaces directory, each workspace corresponds to a folder of the same name
For the migration of the GeoServer service, you only need to package the corresponding workspace folder into the corresponding directory of the new environment, then make some specific adjustments. For a workspace, its hierarchical directory is as follows:
It is important to note that the namespace configuration information in the relevant configuration file, the PostgreSQL database connection configuration information, and so on, need to be changed according to the migrated environment.
After the configuration information change is complete, restart GeoServer, and then verify the test.
Open source Webgis Implementation Program (VI): Spatial data (PostGIS) and GeoServer Service migration