HCL Commerce Version 9.1.8.0 or later

Importing and exporting Query service ZooKeeper configurations

You can migrate your Query service configurations by exporting them as a Zip archive and importing them into the new environment.

HCL Commerce provides endpoints in the Query service that allow you to export all of your ZooKeeper configurations and import them into a new environment.

The API for Export is:
GET http://QUERY_HOST:QUERY_PORT/search/resources/api/v2/configuration/exportConfig

The response of the above APIcall is a zip archive file that contains all of the ZooKeeper configurations. The zip archive has directory structures that represent the znode hierarchy in ZooKeeper. The directory will contain a JSON file if the corresponding znode had data in it.

Note: This API currently excludes connector znodes, STA related znodes and ZooKeeper’s own znodes from the export.

There are no terminal znodes without data in the current ZooKeeper configuration. Consequently, the export API will skip those as well if found.

The API for Import is:
POST http://QUERY_HOST:QUERY_PORT/search/resources/api/v2/configuration/importConfig

This API will take the exported zip archive as a binary body in the request.

It reads the exported zip archive and finds the znodes to import. If those znodes already exist in the environment, then they will be deleted from ZooKeeper first before starting the import.

A restart of the Query service container is required after import for the updated configuration to take effect.