Loading Existing Configuration Files into Cluster Configuration

To load an existing cache.xml or gemfire.properties configuration file into a new cluster, use the --load-cluster-configuration-from-dir parameter when starting up the locator.

You can use this technique to migrate a single server’s configuration into the cluster configuration service. To load an existing cache.xml file or cluster configuration into a cluster, perform the following steps:

  1. Make sure the locator is not currently running.
  2. Within the locator’s working directory, create a cluster_config/cluster directory if the directory does not already exist.
  3. Copy the desired configuration files (cache.xml or gemfire.properties, or both) into the cluster_config/cluster directory.
  4. Rename the configuration files as follows:

    • Rename cache.xml to cluster.xml
    • Rename gemfire.properties to cluster.properties
  5. Start the locator in gfsh as follows:

    gfsh>start locator --name=<locator_name> --enable-cluster-configuration=true --load-cluster-configuration-from-dir=true

    After successful startup, the locator should report that the “Cluster configuration service is up and running.” Any servers that join this cluster and have --use-cluster-configuration set to true will pick up these configuration files.