Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A migration path has been provided in order to facilitate migration from configuration file formats from 1.2.x and previous versions.

The migration code supports two methods of migration from version 1.2.x and earlier, namely file-based and REST service-based.

Data must be in previous formats for migration to succeed.

File-based Migration

The file-based method reads from the files in a standard 1.2.x or earlier configuration, transforms the metadata, and writes them in their new format in the specified target location.  Recall that prior to 1.3.x, OpenCDS required a specific layout for configuration files in addition to a directory/folder layout for the files. File-based configuration for version 1.3.x also requires a similar layout, but this is handled by the migration program.

For Unix-based systems:

Code Block
sh ./bin/migrate.sh --source <path_to_v1.1_files> --target <path_to_v1.3_files>

If the target does not exist, the folder hierarchy will be created.

If the target exists, then the above command will fail.  The migration tool has the ability to overwrite the target folder, as shown below.

Code Block
sh ./bin/migrate.sh --source <path_to_v1.1_files> --target <path_to_v1.3_files> --overwrite

The above options will consolidate the Concept Determination Methods (the concept mappings) into a single file called cdm.xml.  However, the Concept Determination Method mappings can be split up into multiple files, one per ConceptDeterminationMethod, using the following example:

Code Block
sh ./bin/migrate.sh --source <path_to_v1.1_files> --target <path_to_v1.3_files> --split-cdm

Once the files have been migrated, update the opencds.properties file (see Configuring OpenCDS) with the path provided to the --target option.

REST Service-based Migration

The REST Service-based migration reads from the files in a standard 1.2.x or earlier configuration, transforms the metadata, and uploads them to the OpenCDS service.  The storage locations of these files are handled by OpenCDS; all files must be updated through the REST Configuration Service.

Before running the REST Service-based migration, OpenCDS must be running and configured to use BDB as the backend (see Configuration Backend Tooling for details).  Once this is complete, migration can be performed using the following command:

Code Block
sh ./bin/migrate.sh --username <user> --password <pass> --source <path_to_v1.1_files> --target <url_to_opencds_config_rest_service>

This method will migrate data using the PUT method for collections (see Configuration API (REST) Version 1.0 for details).

PLEASE NOTE: Any existing configuration data in the OpenCDS Configuration Rest Service will be discarded and replaced.