Exporting and Importing

Exporting and importing the JMap configuration

Your JMap Server configuration (spatial data sources, databases, projects, layers, etc.) is stored on a disk in binary format. This configuration is only accessible by JMap Server and is only compatible with your current version (main version, e.g. 7.X). Using the export tool, a text version of this configuration can be produced. This exported configuration can then be imported back into JMap Server, with the same settings or different ones. The configuration can even be exported to a newer version. Here are a few examples where exporting and importing your configuration can be useful:

  • You installed a new version of JMap with major changes and you want to reuse your existing configuration. You can export the configuration from your older JMap version and then import it in the newer version.

  • You manage many instances of JMap Server and you need to move a project from one instance to another. You can do a partial export to move only the project you need and then import it in the other instance.

  • You need to replicate your development environment to the production environment. You can do a full export from your development server and then import it in the production server.

To access export and import tools, select Import / Export in the JMap Server section.

Exporting

When exporting a configuration, you must choose whether you want to export the complete configuration or some specific resources (partial exportation). If you choose to export specific resources, you must select if you want to export databases, spatial data sources, projects, style templates or metadata templates. There is a dependency relationship between these different resources: projects depend on spatial data sources and style templates while spatial data sources may depend on databases. Consequently, if you export a project, then spatial data sources, style templates, and possibly databases will also be exported.

The exportation process creates up to 4 files: the .properties file is the main exportation file and contains the configuration information. All files are necessary for the importation. You can determine the destination directory and file name.

Importing

When importing a configuration, you have the choice to import a complete configuration (complete importation) or only a portion of it (partial importation). You can only do a complete importation if the exportation files contain a complete exportation. When doing a complete importation, any existing configuration in JMap Server is deleted and replaced by the imported configuration. When a full importation is completed, you will automatically be sent back to the JMap Admin login page.

When doing a partial importation, there may be situations where the imported resources already exist (identical names). In these cases, you have to tell JMap Admin which action to take: replace the existing resource or create a new one with a different name. The file type data sources that you import are not ready to use and must be updated after the importation.

Exporting and importing JMap user data

JMap user data includes all data created or modified by users. This includes user preferences, contexts, personal layers, data from editable JMap layers, etc. If you change JMap Server instances and you wish to keep all existing user data, you must export it from the previous server and import it into the new server.

The configuration file for the export and import of user data is a .properties file. For a successful export / import, validate that this file contains the following line:

project.id.ID_OF_THE_PROJECT_BEFORE_EXPORT=ID_OF_THE_PROJECT_AFTER_EXPORT_SERVER_CONFIGURATION.

Exporting

When you export user data, you must decide whether to export all data, only the editable layers stored in JMap (including personal layers) or only the workspaces (including contexts, user preferences, etc.).

Importing

When you import user data, there may be situations where imported resources already existed (identical names). In these cases, you must indicate which action JMap Admin must take: replace the existing resource or create a new one under a different name.

Dernière mise à jour

K2 Geospatial 2022