Exporting and Importing Cluster Configurations
The cluster configuration service exports and imports configurations created using
gfsh for an entire Apache Geode cluster.
The cluster configuration service saves the cluster configuration as you create regions, disk-stores and other objects using
gfsh commands. You can export this configuration as well as any jar files that contain application files to a ZIP archive and then import this configuration to create a new cluster.
Exporting a Cluster Configuration
export cluster-configuration command to save the configuration data for your
cluster in a ZIP archive. This ZIP file contains subdirectories for cluster-level configurations and a
directory for each group specified in the cluster. The contents of these directories are described
in Cluster Configuration Files and Troubleshooting.
To export a cluster configuration, run the
export cluster-configuration command while connected to a Geode cluster. For example:
export cluster-configuration --zip-file-name=/home/username/configs/myClusterConfig.zip
gfsh only saves cluster configuration values for configurations specified using
gfsh. Configurations created by the management API are not saved with the cluster configurations.
Importing a Cluster Configuration
import cluster-configuration command to configure a new cluster based on a configuration exported from another system.
You can import a cluster configuration only into a new cluster, or into a running cluster that has not yet been configured and contains no defined regions.
That is, when:
- There are no running cache servers
- The only running cache servers meet all of the following criteria:
- Have been recently started
- Have no regions defined in them
- Have been given no other configuration changes since they started
After you have imported the configuration, any servers you start receive this cluster configuration.
To import a cluster configuration, start one or more locators and then run the
import cluster-configuration command. For example:
import cluster-configuration --zip-file-name=/home/username/configs/myClusterConfig.zip